Parsing JSON data takes a long time. How can I reduce parsing time? #71
Answered
by
jasperhabicht
jasperhabicht
asked this question in
Q&A
|
Parsing large amounts of JSON data takes a very long time up to several minutes. Especially when the file needs to compiled multiple times, this leads to time consuming compilation. How can I reduce parsing and compilation time? |
Answered by
jasperhabicht
Jun 3, 2025
Replies: 1 comment
|
Parsing large or complex data can indeed take a while which is why I track parsing speed with a medium-sized example file (you can see the results in the Here are some ideas to improve the parsing speed:
|
0 replies
Answer selected by
jasperhabicht
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Parsing large or complex data can indeed take a while which is why I track parsing speed with a medium-sized example file (you can see the results in the
benchmarkfolder in the main tree; the file has about 4k6 chars and parsing currently takes about 1 second).Here are some ideas to improve the parsing speed:
jsonparseto the most recent version. Parsing time was reduced a lot with version 1.4.0 and again a bit with version 1.5.0.skip structuresas option to the\JSONParse(FromFile)command. So, for example,\JSONParse[skip structures]{\myjson}{ { "foo" : "bar" } }should be considerably faster than\JSONParse{\myjson}{ { "foo" : "bar" } }.…