In some cases JsDiff.diffWords ate more than 500Mb RAM and I had to kill the process where it was launched

I 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
In some cases
JsDiff.diffWordsate 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