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

Add a maxDepth parameter #31

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jlivak
Copy link

@jlivak jlivak commented Feb 23, 2023

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.

@kibertoad
Copy link

@jlivak Can you address the conflicts?

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

Successfully merging this pull request may close these issues.

2 participants