Conversation
…provement # Conflicts: # r-package/inst/jar/r5r.jar
|
Hi Alex. I've been able to run a few performance tests. See my reprex and a couple comments / questions below . ReprexResultsTLDR: the arrow implementation is faster but indeed it's currently not a huge difference. ps. I think the function Comments / Questions1. returning
|
|
Hi Rafa, To be completely honest I am not 100% on the details of how multithreaded code is handled in the background. However, I believe that the two processes are not happening in parallel, the collector only collects all the batches during runtime, but the actual joining happens after all the batches are recieved. This is because collector.join() is only called after the forloop: My understanding is that this for loop awaits until all the R5 threads finish their processing. So the collecting only happens once R5 is done. Although, I think your concert of R5 and arrow clashing could actually be a way to speed up the function further. I don't think its possible to degrade performance if the two processes are running simultaneously, java is smart and the resources will be distributed as needed there won't be clashing. But the collecting can only happen on a single thread, so at the end of the function, once all the batches are processed we have to wait for a single thread to collect all the tables into one, while the other threads are idle. |
Hi @rafapereirabr,
In the current state I have only implemented
travel_time_matrix()to use arrow. I had to temporarily disableexpanded_travel_time_matrix()to achieve this, which is why tests wont pass.We also now have to include arrow as part of the little jar. A side effect of this is that the size goes from 0.15mb to 6mb. Just something to notice but not an issue.