Subject: bug#24113: 25.1.50; auto-revert-check-vc-info causes delayed screen refreshs

From: Torsten Bronger <[email-masked]>
Date: Sun, 13 Dec 2020 23:55:36 +0100

Hallöchen!

Lars Ingebrigtsen schreibt:

> Torsten Bronger <[email-masked]> writes:
>
>> If auto-revert-check-vc-info is non-nil and some buffers contain
>> version-controlled files, the screen refresh is often delayed.
>> For example, I press "g" in Gnus to get new news, they are indeed
>> fetched, but the screen does not change at first.  After a couple
>> of seconds, the screen is updated and I see the new numbers of
>> messages.
>
> I've tried running with that variable set to t for a while now,
> and I haven't seen any strange pauses after hitting `g' in the
> *Group* buffer.
>
> Are you still seeing this problem in more recent Emacs version?

Not with Gnus and hitting "g".  But still on start-up.

> If so, could you try to create a simpler test case for reproducing
> the problem?

Not simpler, but clearer and hopefully more reliable.

1. Make your Emacs use the following simple .emacs configuration
   file:

       (custom-set-variables
        '(auto-revert-check-vc-info t)
        '(desktop-save-mode t)
       )

   Remove your .emacs.desktop for a fresh start.

2. Make a new directory and create many files in it, e.g. by saying

       mkdir test; cd test; for a in `seq 100`; do touch $a; done

3. Start Emacs and open all of these files, e.g. by using dired-x
   and the keybinding "F".  (Obviously, you have to expand your
   .emacs for this a bit.)  Then, close Emacs let Emacs write your
   buffer status to the desktop file.

4. Open Emacs again.  It will start quickly.  Close it.

5. Say in the directory with the many files:

       git init

6. Open Emacs again.  It will start very slowly.  Close it.

7. Open Emacs again.  This time, press any key during start-up.  It
   will start quickly again.

What I expect is that Emacs always starts quickly, even without
pressing a key.  I can safely say that the delay is VC-related but I
don't know how to proceed to find out at which operation Emacs
hangs.

Regards,
Torsten.

-- 
Torsten Bronger