json-stream-stringify icon indicating copy to clipboard operation
json-stream-stringify copied to clipboard

Add a maxDepth parameter

Open jlivak opened this issue 2 years ago • 1 comments

This library was just what we were looking for, except we found on very large, very deep objects performance would slow to a crawl because it splits up every single object or line.

Adding an optional maxDepth allowed us to increase performance by grouping deeper objects into a single stringify, and we found that it decreased the time it took to fully stringify one of our test objects (~500MBs of data) from ~90 minutes to ~20 seconds, while still avoiding out of memory issues traditional JSON.stringify() had.

jlivak avatar Feb 23 '23 00:02 jlivak

@jlivak Can you address the conflicts?

kibertoad avatar May 31 '24 18:05 kibertoad