You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that fetching a large table from labkey via Rlabkey is significantly slower than other API client like JavaScript, so I profiled the labkey.selectRows call for a large table (182779 rows) from DataSpace.
As we can see, actual fetching of data via POST only takes fraction of time in labkey.SelectRows call, and the majority of time is spent processing the response (processResponse) and creating a data.frame object (makeDF).
We can see that there are redundancies in this process.
We are parsing parsing json twice (step 2 and step 4)
We are creating data.frame twice (step 2 and step 5)
Another thing we should note is that jsonlite::fromJSON(simplifyDataFrame=TRUE) is more efficient in creating a data.frame than Rlabkey:::listToMatrix.
Can you please take a look into this and make changes accordingly?
The text was updated successfully, but these errors were encountered:
I've noticed that fetching a large table from labkey via
Rlabkey
is significantly slower than other API client like JavaScript, so I profiled thelabkey.selectRows
call for a large table (182779 rows) from DataSpace.As we can see, actual fetching of data via
POST
only takes fraction of time inlabkey.SelectRows
call, and the majority of time is spent processing the response (processResponse
) and creating a data.frame object (makeDF
).We can break it down in 5 steps:
POST
We can see that there are redundancies in this process.
Another thing we should note is that
jsonlite::fromJSON(simplifyDataFrame=TRUE)
is more efficient in creating a data.frame thanRlabkey:::listToMatrix
.Can you please take a look into this and make changes accordingly?
The text was updated successfully, but these errors were encountered: