-
Notifications
You must be signed in to change notification settings - Fork 499
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
Bad performance with diffChars method. #225
Comments
I am diff'ing a 400 line XML document with a normalised alternative and the performance is poor. It takes ~5000ms to complete. |
The performance of this lib seems to be quite bad compared to the |
|
Does anyone has a better performance js lib which supports html diff and fast diff both? Much appreciated. @v1talii-dev @josephrocca |
diff-match-patch is going to be faster because it relaxes the constraint that it must generate the shortest edit script. it performs additional semantic cleanups to the diff to make it more human-readable. it's not going to give wrong results on HTML but it may not give a diff that most resembles what a person might describe manually. either way, inasmuch as
|
The particular slow example given in this issue is now handled instantly, thanks to the optimisation in b1b2035, which will hopefully be released in a few weeks; you can try cloning the repo and building & using the code on master in the meantime. Other cases with slow performance would be interesting but to help keep track of what's still slow vs fixed, I'd like new issues opened about them if you find any! |
It's really slow when you have lots of content remove in new string.
Result:
The text was updated successfully, but these errors were encountered: