Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toJSON is very slow compared to using rjson's #613

Closed
nocodehummel opened this issue Apr 7, 2020 · 2 comments
Closed

toJSON is very slow compared to using rjson's #613

nocodehummel opened this issue Apr 7, 2020 · 2 comments

Comments

@nocodehummel
Copy link
Contributor

The default Shiny toJSON (jsonlite) is very slow compared to rjson's toJSON, which is approximately 25x faster in microbench tests (highcharter object with AAPL YTD quotes).

json-benchmark

In my test I found that rjson::toJSON converts NA's to strings, which cannot be plotted by Highcharts (Javascript error 14 in browser console). After removing NA's my charts plot without problems; including OHLC stock, line, stacked bars and scatter.

Suggest to add option to use rjson::toJSON to improve performance.

@nocodehummel
Copy link
Contributor Author

Closed after merge into master.

@hongyuanjia
Copy link

@nordicgit70 #457 guided me here. Thanks for this. I wonder if you could try https://github.com/eddelbuettel/rcppsimdjson, which is I believe the fastest json serialization library for R.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants