GNU bug report logs - #61942
28.2; uninterruptible hang in vc-diff buffer

Previous Next

Package: emacs;

Reported by: Tom Tromey <tom <at> tromey.com>

Date: Fri, 3 Mar 2023 18:14:02 UTC

Severity: normal

Tags: moreinfo

Found in version 28.2

Full log


View this message in rfc822 format

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Tom Tromey <tom <at> tromey.com>, 61942 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: bug#61942: 28.2; uninterruptible hang in vc-diff buffer
Date: Mon, 17 Jun 2024 04:15:00 +0300
Hi!

Late reply here.

On 03/03/2023 20:13, Tom Tromey wrote:
> From*vc-outgoing*, I used '=' to see a diff.
> 
> The diff in question is pretty large.
> 
> Emacs showed this in the echo area:
> 
> Finding changes in ....
> 
> This was not interruptible -- I tried C-g, C-], and 'kill -USR1'
> 
> I don't know exactly what this is doing, but whatever it is should be
> interruptible.

I've been doing some performance debugging for vc-diff, and the same 
thing has happened once when c-ts-mode was associated with *.c files.

That time I also turned off the cache for diff's revision syntax 
highlighting and repeated a 'vc-diff' for one revision several times.

Profiling this scenario gets me to

        7940  85%             - diff--get-revision-properties
        7940  85%              - let*
        5637  61%               - if
        5637  61%                - condition-case
        5637  61%                 - vc-find-revision-no-save
        5622  60%                  - decode-coding-inserted-region
           3   0%                   - set-auto-coding
           3   0%                    - find-auto-coding
           3   0%                     + set-auto-mode-1
          12   0%                  + set-auto-mode
           3   0%                  + vc-call-backend

and if we're talking about tree-sitter based modes, it might be due to 
memory usage (or not).

Anyway, if you're seeing this regularly

  (setq diff-font-lock-syntax 'hunk-only)

should help as a workaround.




This bug report was last modified 188 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.