reassign 1079088 emacs severity 1079088 normal thanks
El 20/8/24 a las 2:10, Vincent Lefevre escribió:
Package: diffutils Version: 1:3.10-1 Severity: important Affects: emacs-gtk Forwarded: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72723 I've just reported the following bug upstream: ------------------------------------------------------------------ When opening a .diff file, GNU Emacs runs "diff -ad" on 2 files it has built (I suppose that the reason is to get a word diff), and this can be very slow, even though the original .diff file is rather simple. I've attached a slow-diff.tar.xz archive with: * diff1L52tn0 and diff2U4TVho (files built be GNU Emacs). * file.diff the original .diff file. When running "/usr/bin/emacs -Q file.diff.xz", I could see what takes the whole time with ps or top. Here I could see diff -ad /tmp/diff1L52tn0 /tmp/diff2U4TVho As this is slow, I could obtain these files. On my recent machine, "diff -ad diff1L52tn0 diff2U4TVho" takes 27 seconds. ------------------------------------------------------------------ Note that Emacs cannot even be interrupted with C-g (this may be an additional bug in Emacs).
As pointed out by Paul Eggert in bug-diffutils, diff -d is *inherently* slow. This is documented in the diff --help output: -d, --minimal try *hard* to find a smaller set of changes and also in the texinfo manual: '-d' '--minimal' Change the algorithm perhaps find a smaller set of changes. This makes 'diff' slower (sometimes much slower). Since I can't control how emacs calls diff, there is nothing I can reasonably do on the diffutils packaging side. Thanks.