You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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: