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

diff for large arrays never returns and uses 100% CPU forever #353

Closed
joniba opened this issue Feb 22, 2022 · 2 comments
Closed

diff for large arrays never returns and uses 100% CPU forever #353

joniba opened this issue Feb 22, 2022 · 2 comments

Comments

@joniba
Copy link

joniba commented Feb 22, 2022

When comparing large arrays (over 350 elments) containing nested JSON objcts, diffJson never returns and the process uses 100% CPU forever. Quite a disappointment. I'm guessing this is pretty easy to replicate, but I'm sure I can fabricate an example if needed.

EDIT: Actually I found that I can't easily reproduce this manually. This occurs when comparing objects retrieved from the DB, but doesn't seem to occur with simple fabricated objects, even when they are nested. If I succeed in reproducing I'll post some code.

@sphawkins
Copy link

I am having the exact same issue. In my case I am serializing data objects to json and comparing them against a prior json object. It appears as though it isn't the number of total elements, but rather the number of changes. In my case I am estimating there are about 1400 changes between these two jsons. When I cut the number in half, it displays quite quickly.

@ExplodingCabbage
Copy link
Collaborator

There have been a couple of major performance improvements on master (not yet released to npm) that probably resolve this: #411, #448.

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

No branches or pull requests

3 participants