Re:Sonic: A fast JSON serializing and deserializing library
by Groxx on Tuesday November 23, 2021 @06:09PM
(#29324716)
Depends. I've had multi-gigabyte `[{..}, {..}, ...]` json arrays from database dumps, and doing even basic things with that with jq takes ages unless you use the (highly obtuse IMO) streaming methods. Sometimes you can pre-grep to filter the results to something trivial to process, but sometimes the structure is not unique enough to let you do that, or it depends on multiple field values - filtering that with a json parser makes perfect sense, and then speed can matter.
That said, a 2x+ improvement for a couple megabytes, especially if done many times per second, is still a significant improvement.
That said, a 2x+ improvement for a couple megabytes, especially if done many times per second, is still a significant improvement.