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

From: Torsten Bronger <[email-masked]>
Date: Sat, 30 Jul 2016 12:44:42 +0200

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.

This is *much* more visible if Emacs is used through an X tunnel (what I
often do).  But it also happens locally.

Note that this definitely is not caused by a slow NNTP connection.  I
observe the same thing when pressing RET in a Gnus mail folder summary
buffer, when everything is fetched locally.  I observe the same thing in
many other situations outside Gnus, sometimes even when I simply insert
a character: It does appear only after a couple of seconds.

Every time this happens, I can immediately proceed after hitting any
key.  I frequently use the cursor keys for that because they don't
actually do anything.

It also causes massive delays during Emacs startup if many buffers need
to be restored from the desktop file.  Therefore, I usually press
left-right-left-right-left-right... during startup to accelerate it.

I observe this for years now in SVN/Bazaar/Git Emacs, but not before
last week I finally found out that auto-revert-check-vc-info is the
trigger.

In GNU Emacs 25.1.50.10 (x86_64-pc-linux-gnu)
 of 2016-07-08 built on wolowitz
Repository revision: 56c8551219ecace0157ce813733adf8eecb38c32
Windowing system distributor 'The X.Org Foundation', version 11.0.11803000
System Description:	Ubuntu 16.04.1 LTS

Recent messages:
Enter a change comment.  Type C-c C-c when done
Checking in /home/bronger/src/lensfun/tools/calibration_webserver/calibration/views.py...done
remote: <Repository /git/p/lensfun/code.git> refresh queued.        
To ssh://[email-masked]/p/lensfun/code
   85a20ea..528e611  master -> master
To [email-masked]:lensfun/lensfun.git
   85a20ea..528e611  master -> master
Auto-saving...
Mark set
Making completion list...

Configured using:
 'configure --prefix=/usr/local/ --mandir=/usr/local/share/man/
 --infodir=/usr/local/share/info/ --with-x-toolkit=no --without-makeinfo
 --with-xpm --with-jpeg --with-tiff --with-gif --with-png --with-x'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB X11

Important settings:
  value of $EMACSLOADPATH: /home/bronger/.emacs.d/lisp:
  value of $LC_MONETARY: de_DE.UTF-8
  value of $LC_NUMERIC: de_DE.UTF-8
  value of $LC_TIME: de_DE.UTF-8
  value of $LANG: de_DE.UTF-8
  value of $XMODIFIERS: @im=fcitx
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  global-auto-revert-mode: t
  savehist-mode: t
  desktop-save-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Load-path shadows:
/home/bronger/.emacs.d/lisp/visual-basic-mode hides /home/bronger/.emacs.d/lisp/nxhtml/related/visual-basic-mode
/home/bronger/.emacs.d/lisp/yasnippet/snippets/fundamental-mode/.yas-setup hides /home/bronger/.emacs.d/lisp/yasnippet/snippets/prog-mode/.yas-setup
/home/bronger/.emacs.d/lisp/yasnippet/snippets/fundamental-mode/.yas-setup hides /home/bronger/.emacs.d/lisp/yasnippet/snippets/python-mode/.yas-setup
/home/bronger/.emacs.d/lisp/yasnippet/snippets/fundamental-mode/.yas-setup hides /home/bronger/.emacs.d/lisp/yasnippet/yasmate/snippets/html-mode/.yas-setup
/home/bronger/.emacs.d/lisp/yasnippet/snippets/fundamental-mode/.yas-setup hides /home/bronger/.emacs.d/lisp/yasnippet/yasmate/snippets/objc-mode/.yas-setup
/home/bronger/.emacs.d/lisp/yasnippet/snippets/fundamental-mode/.yas-setup hides /home/bronger/.emacs.d/lisp/yasnippet/yasmate/snippets/rails-mode/.yas-setup
/home/bronger/.emacs.d/lisp/yasnippet/yasmate/snippets/html-mode/.yasmate-extra-substitutions hides /home/bronger/.emacs.d/lisp/yasnippet/yasmate/snippets/rails-mode/.yasmate-extra-substitutions
/home/bronger/.emacs.d/lisp/yasnippet/snippets/fundamental-mode/.yas-setup hides /home/bronger/.emacs.d/lisp/yasnippet/yasmate/snippets/ruby-mode/.yas-setup
/home/bronger/.emacs.d/lisp/yasnippet/yasmate/snippets/html-mode/.yasmate-extra-substitutions hides /home/bronger/.emacs.d/lisp/yasnippet/yasmate/snippets/ruby-mode/.yasmate-extra-substitutions

Features:
(shadow emacsbug sendmail shr svg dom gnus-fun log-edit pcvs-util vc
canlock nnir qp mm-archive gnus-picon sort smiley gnus-cite gnus-async
gnus-bcklg gnus-ml gmane nndraft nnmh gnus-agent gnus-srvr gnus-score
score-mode nnvirtual gnus-msg nnml nnfolder gnus-cache bbdb-gnus
gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum bbdb-snarf
mail-extr bbdb-com warnings network-stream nsm starttls nntp gnus-topic
gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls
gnutls utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range message
puny rfc822 mml mml-sec epa epg mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus nnheader js moz
imenu cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs smerge-mode add-log disp-table python tramp-sh
tramp tramp-compat tramp-loaddefs trampver ucs-normalize shell json map
flyspell ispell dired-aux vc-git diff-mode rng-xsd xsd-regexp rng-cmpct
rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt
rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap sgml-mode
nxml-util nxml-enc xmltok cql-mode sql view rust-mode swift-mode
go-errcheck go-mode url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util mailcap find-file ffap
thingatpt etags xref project yaml-mode dockerfile-mode derived rx
sh-script smie executable dired-x adaptive-wrap vc-dispatcher vc-bzr
org-element org-rmail org-mhe org-irc org-info org-gnus gnus-util rmail
rmail-loaddefs rfc2047 rfc2045 ietf-drums mail-utils org-docview
org-bibtex bibtex org-bbdb org-w3m org-agenda ob-python org org-macro
org-footnote org-pcomplete pcomplete org-list org-faces org-entities
noutline outline org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob
ob-table ob-exp org-src ob-keys ob-comint ob-core ob-eval org-compat
org-macs org-loaddefs format-spec find-func server w3m browse-url
doc-view subr-x jka-compr dired dired-loaddefs image-mode w3m-hist
w3m-fb bookmark-w3m w3m-ems wid-edit w3m-ccl ccl w3m-favicon w3m-image
w3m-proc w3m-util rst compile comint ansi-color ring browse-kill-ring
mmm-mode mmm-univ mmm-class mmm-region mmm-auto mmm-vars mmm-utils
mmm-compat cl bbdb-autoloads bbdb timezone cal-china lunar solar cal-dst
cal-bahai cal-islam cal-hebrew holidays hol-loaddefs appt diary-lib
diary-loaddefs cal-menu calendar cal-loaddefs preview prv-emacs info
reporter latex easy-mmode tex-style tex-buf tex dbus xml advice mm-util
mail-prsvr autorevert filenotify preview-latex tex-site auto-loads
edmacro kmacro savehist desktop frameset delsel cus-start cus-load
finder-inf package epg-config url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars seq
byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv
cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote dbusbind inotify dynamic-setting
system-font-setting font-render-setting x multi-tty make-network-process
emacs)

Memory information:
((conses 16 669284 57188)
 (symbols 48 134861 0)
 (miscs 40 3828 1141)
 (strings 32 181787 13978)
 (string-bytes 1 5639699)
 (vectors 16 80975)
 (vector-slots 8 1972469 198306)
 (floats 8 1444 1008)
 (intervals 56 6510 37)
 (buffers 976 87)
 (heap 1024 146926 39779))

-- 
Torsten Bronger    Jabber ID: [email-masked]