-
Notifications
You must be signed in to change notification settings - Fork 504
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
Slow to execute over diffs with a large number of changes #27
Comments
Hi @kpdecker, have you had any chance to look into this? I'm seeing the same issue with |
Any diffing algorithm is going to take time when presented with a lot of options and particularly when those options are very different. I was able to dramatically improve the runtime of this test case though, dropping the exec time from 18min to 2min on my local machine. The memory use also dropped from GBs to 200-300MB (All of these times are from exec within a Node environment) There might be some remaining minor optimizations that are available, but short of changing the algorithm or diffing a smaller set of data such as lines, there aren't many alternatives for massive improvement, I fear. |
Released in 1.2.0 |
In some cases
JsDiff.diffWords
ate more than 500Mb RAM and I had to kill the process where it was launchedI found this in node.js environment but it also produced in browser.
Data for reproducing this bug is here: https://gist.github.com/termi/9875658
The text was updated successfully, but these errors were encountered: