cyclestreets / cyclestreets-r

An R interface to cyclestreets.net APIs
https://rpackage.cyclestreets.net/
GNU General Public License v3.0
27 stars 7 forks source link

Replace jsonlite with Rcppsimdjson #65

Closed Robinlovelace closed 1 year ago

Robinlovelace commented 1 year ago

Superceded by #69 which is ~10x more important.

Robinlovelace commented 1 year ago

De-prioritising because, as shown below, json2sf_cs() is 10x slower than the actual json read stage:

routes_wait = batch(id = 3724, username = "robinlovelace", wait = TRUE, delete_job = FALSE)
Congrats, your data is ready
Reading in the following file:
/tmp/RtmppAI2tN/test.csv.gz
Rows: 334 Columns: 7
── Column specification ──────────────────────────────────────────────────────────────────
Delimiter: ","
chr (4): start_id, end_id, strategy, json
dbl (3): distance, time_seconds, calories

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Reading route data
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01s  
Converting json values to linestrings
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=10s  
Robinlovelace commented 1 year ago

Latest benchmark:

image