dkyleward / caliperR

Interact with Caliper software from R
Apache License 2.0
1 stars 0 forks source link

Current handling of vectors over COM is slow #6

Open dkyleward opened 4 years ago

dkyleward commented 4 years ago

Currently, when Caliper software sends a vector over COM, RDCOMClient leaves it as a pointer. The caliper package checks to see if that pointer is pointing to a vector and, if so, converts it to an array using the GISDK V2A() and then sends it over COM.

This process is incredibly slow. If it can work, the ideal solution would be to modify the C++ code in RDCOMClient to understand what the vector is and translate it into data R can understand.

Although ugly, an interim solution would be to write the vector to a temp file and read it into R. This is almost assuredly faster than the current code.

dkyleward commented 4 years ago

Further testing revealed that it isn't the V2A() in GISDK that is slow. It's sending large arrays over COM. This appears to be a limitation of RDCOMClient.