3 ms·
I've written programs for digesting, parsing, and querying data out of many gigabytes of JSON REALLY REALLY fast by not doing any unnecessary memory allocation
by jamal-kumar 5y ago
I've written programs for digesting, parsing, and querying data out of many gigabytes of JSON REALLY REALLY fast by not doing any unnecessary memory allocation at all. Keeping everything into streaming APIs and out of that particular bottleneck is the key to doing this, really just no malloc, and that's what this article seems to be about kind of... When you manage to avoid that you can do it in pretty much any language. AWK/SED is perfect for when it comes to field-seperated data like CSV, these tricks are really old! When it comes to JSON I've just written my own stuff, though, because that nested-tree-structure is bound to be different for each data set.