-
Notifications
You must be signed in to change notification settings - Fork 501
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
Massive performance degradation when truncating large file (20,000x slower than Google's diff-match-patch
package)
#239
Comments
diff-patch-match
package)
diff-patch-match
package)diff-match-patch
package)
But google diff could not generate a diff like git diff or linux diff tool, so it could not make a beautiful diff, any solutions? Much appriciated |
I profiled Line 66 in d358a57
Lines 230 to 232 in d358a57
|
I ran into this as well. There are a few spots which are using new objects inefficiently, with I have a working copy of a local change which makes this a lot better, which I'll PR shortly. |
(Note they're pre-release, but you can test against master if you want to confirm.) |
Hi there, I've been having some performance problems with
createPatch
and have managed to create a minimal example that replicates the problem. The patch creation takes about 20,000 times longer than it should. It seems to occur when I'm doing large truncations. Here's the code:Here's the output I get for that:
So unless I'm doing something wrong here, there's a huge performance disparity between this package and the
diff-patch-match
package for patch creation in certain situations.diff-patch-match
is normally about 2x-10x faster depending on the size of the strings, but here its a lot faster... so something's obviously going wrong here.This is what I'm seeing in the profiler:
Any idea what's happening here?
The text was updated successfully, but these errors were encountered: