GNU bug report logs - #79132
30.1; lots of overlays with box face causes high usage of redisplay_internal

Previous Next

Package: emacs;

Reported by: Godefroy Vannoye <godefroy.vannoye <at> gmail.com>

Date: Thu, 31 Jul 2025 09:59:02 UTC

Severity: normal

Found in version 30.1

To reply to this bug, email your comments to 79132 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#79132; Package emacs. (Thu, 31 Jul 2025 09:59:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Godefroy Vannoye <godefroy.vannoye <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 31 Jul 2025 09:59:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Godefroy Vannoye <godefroy.vannoye <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.1; lots of overlays with box face causes high usage of
 redisplay_internal
Date: Thu, 31 Jul 2025 11:57:55 +0200
While using flymake with flymake-show-diagnostics-at-end-of-line set to
t, I notice a significant slowdown when moving the cursor up and down.

After digging a bit, the issue seems to come from a high number of
overlays with the box face property (as flymake generates them). When I 
change
the face to remove the box property, I don't notice any slowdown. It is
also possible that the slowdown mainly happens where there are multiple
boxes on the same line (due to multiple warnings from flymake on the
same line).

I used to profiler and saw a high CPU usage from redisplay_internal.

Tested on both pure-gtk and Xorg emacs, the slowdown happens in both
cases.

I hope that my explanation is clear enough to give some hints on where
to look for a fix.

I stay at your disposal for any questions (I tried to make a minimal
working example but could not find the proper time) and thank you in
advance for looking at this issue!

In GNU Emacs 30.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.49,
cairo version 1.18.4)
System Description: Arch Linux

Configured using:
 'configure --with-pgtk --sysconfdir=/etc --prefix=/usr
 --libexecdir=/usr/lib --localstatedir=/var --disable-build-details
 --with-cairo --with-harfbuzz --with-libsystemd --with-modules
 --with-native-compilation=aot --with-tree-sitter 'CFLAGS=-march=x86-64
 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3
 -Wformat -Werror=format-security -fstack-clash-protection
 -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g
 -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto'
 'LDFLAGS=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro
 -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto'
 'CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions
 -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security
 -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer
 -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -g
 -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY
PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB

Important settings:
  value of $LC_ALL: en_US.UTF-8
  value of $LC_CTYPE: en_US.UTF-8
  value of $LC_MONETARY: fr_FR.UTF-8
  value of $LC_NUMERIC: fr_FR.UTF-8
  value of $LC_TIME: fr_FR.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: ELisp/d

Minor modes in effect:
  aggressive-indent-mode: t
  visual-wrap-prefix-mode: t
  display-line-numbers-mode: t
  completion-preview-mode: t
  global-org-modern-mode: t
  vertico-mode: t
  spacious-padding-mode: t
  ultra-scroll-mode: t
  pixel-scroll-precision-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  dirvish-override-dired-mode: t
  global-treesit-auto-mode: t
  marginalia-mode: t
  popper-mode: t
  recentf-mode: t
  savehist-mode: t
  delete-selection-mode: t
  elpaca-use-package-mode: t
  override-global-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  column-number-mode: t
  line-number-mode: t
  visual-line-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/var/home/godefroy/.config/emacs/elpaca/builds/transient/transient hides 
/usr/share/emacs/30.1/lisp/transient
/var/home/godefroy/.config/emacs/elpaca/builds/ef-themes/theme-loaddefs 
hides /usr/share/emacs/30.1/lisp/theme-loaddefs
/var/home/godefroy/.config/emacs/elpaca/builds/org/ox hides 
/usr/share/emacs/30.1/lisp/org/ox
/var/home/godefroy/.config/emacs/elpaca/builds/org/ox-texinfo hides 
/usr/share/emacs/30.1/lisp/org/ox-texinfo
/var/home/godefroy/.config/emacs/elpaca/builds/org/ox-publish hides 
/usr/share/emacs/30.1/lisp/org/ox-publish
/var/home/godefroy/.config/emacs/elpaca/builds/org/ox-org hides 
/usr/share/emacs/30.1/lisp/org/ox-org
/var/home/godefroy/.config/emacs/elpaca/builds/org/ox-odt hides 
/usr/share/emacs/30.1/lisp/org/ox-odt
/var/home/godefroy/.config/emacs/elpaca/builds/org/ox-md hides 
/usr/share/emacs/30.1/lisp/org/ox-md
/var/home/godefroy/.config/emacs/elpaca/builds/org/ox-man hides 
/usr/share/emacs/30.1/lisp/org/ox-man
/var/home/godefroy/.config/emacs/elpaca/builds/org/ox-latex hides 
/usr/share/emacs/30.1/lisp/org/ox-latex
/var/home/godefroy/.config/emacs/elpaca/builds/org/ox-koma-letter hides 
/usr/share/emacs/30.1/lisp/org/ox-koma-letter
/var/home/godefroy/.config/emacs/elpaca/builds/org/ox-icalendar hides 
/usr/share/emacs/30.1/lisp/org/ox-icalendar
/var/home/godefroy/.config/emacs/elpaca/builds/org/ox-html hides 
/usr/share/emacs/30.1/lisp/org/ox-html
/var/home/godefroy/.config/emacs/elpaca/builds/org/ox-beamer hides 
/usr/share/emacs/30.1/lisp/org/ox-beamer
/var/home/godefroy/.config/emacs/elpaca/builds/org/ox-ascii hides 
/usr/share/emacs/30.1/lisp/org/ox-ascii
/var/home/godefroy/.config/emacs/elpaca/builds/org/org hides 
/usr/share/emacs/30.1/lisp/org/org
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-version hides 
/usr/share/emacs/30.1/lisp/org/org-version
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-timer hides 
/usr/share/emacs/30.1/lisp/org/org-timer
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-tempo hides 
/usr/share/emacs/30.1/lisp/org/org-tempo
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-table hides 
/usr/share/emacs/30.1/lisp/org/org-table
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-src hides 
/usr/share/emacs/30.1/lisp/org/org-src
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-refile hides 
/usr/share/emacs/30.1/lisp/org/org-refile
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-protocol hides 
/usr/share/emacs/30.1/lisp/org/org-protocol
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-plot hides 
/usr/share/emacs/30.1/lisp/org/org-plot
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-persist hides 
/usr/share/emacs/30.1/lisp/org/org-persist
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-pcomplete hides 
/usr/share/emacs/30.1/lisp/org/org-pcomplete
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-num hides 
/usr/share/emacs/30.1/lisp/org/org-num
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-mouse hides 
/usr/share/emacs/30.1/lisp/org/org-mouse
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-mobile hides 
/usr/share/emacs/30.1/lisp/org/org-mobile
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-macs hides 
/usr/share/emacs/30.1/lisp/org/org-macs
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-macro hides 
/usr/share/emacs/30.1/lisp/org/org-macro
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-loaddefs hides 
/usr/share/emacs/30.1/lisp/org/org-loaddefs
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-list hides 
/usr/share/emacs/30.1/lisp/org/org-list
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-lint hides 
/usr/share/emacs/30.1/lisp/org/org-lint
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-keys hides 
/usr/share/emacs/30.1/lisp/org/org-keys
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-inlinetask hides 
/usr/share/emacs/30.1/lisp/org/org-inlinetask
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-indent hides 
/usr/share/emacs/30.1/lisp/org/org-indent
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-id hides 
/usr/share/emacs/30.1/lisp/org/org-id
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-habit hides 
/usr/share/emacs/30.1/lisp/org/org-habit
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-goto hides 
/usr/share/emacs/30.1/lisp/org/org-goto
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-footnote hides 
/usr/share/emacs/30.1/lisp/org/org-footnote
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-fold hides 
/usr/share/emacs/30.1/lisp/org/org-fold
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-fold-core hides 
/usr/share/emacs/30.1/lisp/org/org-fold-core
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-feed hides 
/usr/share/emacs/30.1/lisp/org/org-feed
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-faces hides 
/usr/share/emacs/30.1/lisp/org/org-faces
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-entities hides 
/usr/share/emacs/30.1/lisp/org/org-entities
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-element hides 
/usr/share/emacs/30.1/lisp/org/org-element
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-element-ast hides 
/usr/share/emacs/30.1/lisp/org/org-element-ast
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-duration hides 
/usr/share/emacs/30.1/lisp/org/org-duration
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-datetree hides 
/usr/share/emacs/30.1/lisp/org/org-datetree
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-cycle hides 
/usr/share/emacs/30.1/lisp/org/org-cycle
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-ctags hides 
/usr/share/emacs/30.1/lisp/org/org-ctags
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-crypt hides 
/usr/share/emacs/30.1/lisp/org/org-crypt
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-compat hides 
/usr/share/emacs/30.1/lisp/org/org-compat
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-colview hides 
/usr/share/emacs/30.1/lisp/org/org-colview
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-clock hides 
/usr/share/emacs/30.1/lisp/org/org-clock
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-capture hides 
/usr/share/emacs/30.1/lisp/org/org-capture
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-attach hides 
/usr/share/emacs/30.1/lisp/org/org-attach
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-attach-git hides 
/usr/share/emacs/30.1/lisp/org/org-attach-git
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-archive hides 
/usr/share/emacs/30.1/lisp/org/org-archive
/var/home/godefroy/.config/emacs/elpaca/builds/org/org-agenda hides 
/usr/share/emacs/30.1/lisp/org/org-agenda
/var/home/godefroy/.config/emacs/elpaca/builds/org/ol hides 
/usr/share/emacs/30.1/lisp/org/ol
/var/home/godefroy/.config/emacs/elpaca/builds/org/ol-w3m hides 
/usr/share/emacs/30.1/lisp/org/ol-w3m
/var/home/godefroy/.config/emacs/elpaca/builds/org/ol-rmail hides 
/usr/share/emacs/30.1/lisp/org/ol-rmail
/var/home/godefroy/.config/emacs/elpaca/builds/org/ol-mhe hides 
/usr/share/emacs/30.1/lisp/org/ol-mhe
/var/home/godefroy/.config/emacs/elpaca/builds/org/ol-man hides 
/usr/share/emacs/30.1/lisp/org/ol-man
/var/home/godefroy/.config/emacs/elpaca/builds/org/ol-irc hides 
/usr/share/emacs/30.1/lisp/org/ol-irc
/var/home/godefroy/.config/emacs/elpaca/builds/org/ol-info hides 
/usr/share/emacs/30.1/lisp/org/ol-info
/var/home/godefroy/.config/emacs/elpaca/builds/org/ol-gnus hides 
/usr/share/emacs/30.1/lisp/org/ol-gnus
/var/home/godefroy/.config/emacs/elpaca/builds/org/ol-eww hides 
/usr/share/emacs/30.1/lisp/org/ol-eww
/var/home/godefroy/.config/emacs/elpaca/builds/org/ol-eshell hides 
/usr/share/emacs/30.1/lisp/org/ol-eshell
/var/home/godefroy/.config/emacs/elpaca/builds/org/ol-doi hides 
/usr/share/emacs/30.1/lisp/org/ol-doi
/var/home/godefroy/.config/emacs/elpaca/builds/org/ol-docview hides 
/usr/share/emacs/30.1/lisp/org/ol-docview
/var/home/godefroy/.config/emacs/elpaca/builds/org/ol-bibtex hides 
/usr/share/emacs/30.1/lisp/org/ol-bibtex
/var/home/godefroy/.config/emacs/elpaca/builds/org/ol-bbdb hides 
/usr/share/emacs/30.1/lisp/org/ol-bbdb
/var/home/godefroy/.config/emacs/elpaca/builds/org/oc hides 
/usr/share/emacs/30.1/lisp/org/oc
/var/home/godefroy/.config/emacs/elpaca/builds/org/oc-natbib hides 
/usr/share/emacs/30.1/lisp/org/oc-natbib
/var/home/godefroy/.config/emacs/elpaca/builds/org/oc-csl hides 
/usr/share/emacs/30.1/lisp/org/oc-csl
/var/home/godefroy/.config/emacs/elpaca/builds/org/oc-bibtex hides 
/usr/share/emacs/30.1/lisp/org/oc-bibtex
/var/home/godefroy/.config/emacs/elpaca/builds/org/oc-biblatex hides 
/usr/share/emacs/30.1/lisp/org/oc-biblatex
/var/home/godefroy/.config/emacs/elpaca/builds/org/oc-basic hides 
/usr/share/emacs/30.1/lisp/org/oc-basic
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob hides 
/usr/share/emacs/30.1/lisp/org/ob
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-tangle hides 
/usr/share/emacs/30.1/lisp/org/ob-tangle
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-table hides 
/usr/share/emacs/30.1/lisp/org/ob-table
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-sqlite hides 
/usr/share/emacs/30.1/lisp/org/ob-sqlite
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-sql hides 
/usr/share/emacs/30.1/lisp/org/ob-sql
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-shell hides 
/usr/share/emacs/30.1/lisp/org/ob-shell
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-sed hides 
/usr/share/emacs/30.1/lisp/org/ob-sed
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-screen hides 
/usr/share/emacs/30.1/lisp/org/ob-screen
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-scheme hides 
/usr/share/emacs/30.1/lisp/org/ob-scheme
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-sass hides 
/usr/share/emacs/30.1/lisp/org/ob-sass
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-ruby hides 
/usr/share/emacs/30.1/lisp/org/ob-ruby
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-ref hides 
/usr/share/emacs/30.1/lisp/org/ob-ref
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-python hides 
/usr/share/emacs/30.1/lisp/org/ob-python
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-processing hides 
/usr/share/emacs/30.1/lisp/org/ob-processing
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-plantuml hides 
/usr/share/emacs/30.1/lisp/org/ob-plantuml
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-perl hides 
/usr/share/emacs/30.1/lisp/org/ob-perl
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-org hides 
/usr/share/emacs/30.1/lisp/org/ob-org
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-octave hides 
/usr/share/emacs/30.1/lisp/org/ob-octave
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-ocaml hides 
/usr/share/emacs/30.1/lisp/org/ob-ocaml
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-maxima hides 
/usr/share/emacs/30.1/lisp/org/ob-maxima
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-matlab hides 
/usr/share/emacs/30.1/lisp/org/ob-matlab
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-makefile hides 
/usr/share/emacs/30.1/lisp/org/ob-makefile
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-lua hides 
/usr/share/emacs/30.1/lisp/org/ob-lua
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-lob hides 
/usr/share/emacs/30.1/lisp/org/ob-lob
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-lisp hides 
/usr/share/emacs/30.1/lisp/org/ob-lisp
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-lilypond hides 
/usr/share/emacs/30.1/lisp/org/ob-lilypond
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-latex hides 
/usr/share/emacs/30.1/lisp/org/ob-latex
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-julia hides 
/usr/share/emacs/30.1/lisp/org/ob-julia
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-js hides 
/usr/share/emacs/30.1/lisp/org/ob-js
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-java hides 
/usr/share/emacs/30.1/lisp/org/ob-java
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-haskell hides 
/usr/share/emacs/30.1/lisp/org/ob-haskell
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-groovy hides 
/usr/share/emacs/30.1/lisp/org/ob-groovy
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-gnuplot hides 
/usr/share/emacs/30.1/lisp/org/ob-gnuplot
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-fortran hides 
/usr/share/emacs/30.1/lisp/org/ob-fortran
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-forth hides 
/usr/share/emacs/30.1/lisp/org/ob-forth
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-exp hides 
/usr/share/emacs/30.1/lisp/org/ob-exp
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-eval hides 
/usr/share/emacs/30.1/lisp/org/ob-eval
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-eshell hides 
/usr/share/emacs/30.1/lisp/org/ob-eshell
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-emacs-lisp hides 
/usr/share/emacs/30.1/lisp/org/ob-emacs-lisp
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-dot hides 
/usr/share/emacs/30.1/lisp/org/ob-dot
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-ditaa hides 
/usr/share/emacs/30.1/lisp/org/ob-ditaa
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-css hides 
/usr/share/emacs/30.1/lisp/org/ob-css
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-core hides 
/usr/share/emacs/30.1/lisp/org/ob-core
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-comint hides 
/usr/share/emacs/30.1/lisp/org/ob-comint
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-clojure hides 
/usr/share/emacs/30.1/lisp/org/ob-clojure
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-calc hides 
/usr/share/emacs/30.1/lisp/org/ob-calc
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-awk hides 
/usr/share/emacs/30.1/lisp/org/ob-awk
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-R hides 
/usr/share/emacs/30.1/lisp/org/ob-R
/var/home/godefroy/.config/emacs/elpaca/builds/org/ob-C hides 
/usr/share/emacs/30.1/lisp/org/ob-C

Features:
(shadow sort mail-extr emacsbug help-fns radix-tree vertico-sort
misearch multi-isearch aggressive-indent mule-util visual-wrap
display-line-numbers completion-preview ef-light-theme org-modern
vertico spacious-padding casual casual-lib ultra-scroll pixel-scroll
cua-base julia-ts-mode julia-ts-misc julia-mode julia-mode-latexsubs
fish-mode lua-mode focus eglot-ltex f dash s eglot external-completion
jsonrpc xref ert ewoc debug backtrace snakemake-mode python eat
term/xterm xterm term disp-table ehelp color olivetti face-remap
kbd-mode advice magit-bookmark magit-submodule magit-blame magit-stash
magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone
magit-remote magit-commit magit-sequence magit-notes magit-worktree
magit-tag magit-merge magit-branch magit-reset magit-files magit-refs
magit-status magit magit-repos magit-apply magit-wip magit-log
which-func imenu magit-diff smerge-mode diff diff-mode track-changes
git-commit log-edit message sendmail yank-media puny rfc822 mml mml-sec
epa derived epg rfc6068 epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums
mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log
magit-core magit-autorevert autorevert filenotify magit-margin
magit-transient magit-process with-editor server magit-mode benchmark
magit-git magit-base magit-section cursor-sensor crm llama comp
comp-cstr comp-run comp-common transient pdf-tools package browse-url
url-handlers cus-edit cus-start cus-load pdf-view jka-compr pdf-cache
pdf-info tq pdf-util pdf-macs image-mode exif mwim embark-consult
consult bookmark pp embark-org org-element org-persist org-id org-refile
avl-tree generator embark ffap dirvish dired dired-loaddefs treesit-auto
marginalia orderless compat org ob ob-tangle ob-ref ob-lob ob-table
ob-exp org-macro org-src sh-script smie treesit executable ob-comint
org-element-ast inline org-pcomplete org-list org-footnote org-faces
org-entities noutline outline ob-emacs-lisp ob-core ob-eval org-cycle
org-table ol org-fold org-fold-core org-keys oc find-func cal-menu
calendar cal-loaddefs org-version org-compat org-macs rotate popper
ef-themes spacious-padding-autoloads casual-autoloads
ultra-scroll-autoloads julia-snail-autoloads spinner-autoloads
popup-autoloads julia-ts-mode-autoloads julia-mode-autoloads
fish-mode-autoloads lua-mode-autoloads focus-autoloads cdlatex-autoloads
aggressive-indent-autoloads eglot-ltex-autoloads auctex-autoloads
tex-site snakemake-mode-autoloads eat-autoloads vundo-autoloads
olivetti-autoloads kbd-mode-autoloads magit-autoloads pcase
magit-section-autoloads llama-autoloads with-editor-autoloads
transient-autoloads pdf-tools-autoloads tablist-autoloads mwim-autoloads
avy-autoloads embark-consult-autoloads embark-autoloads
dirvish-autoloads treesit-auto-autoloads citar-autoloads
citeproc-autoloads queue-autoloads string-inflection-autoloads
parsebib-autoloads consult-autoloads marginalia-autoloads cape-autoloads
vertico-autoloads orderless-autoloads org-modern-autoloads org-loaddefs
rotate-autoloads popper-autoloads helpful-autoloads f-autoloads
elisp-refs-autoloads dash-autoloads s-autoloads ef-themes-autoloads
recentf tree-widget wid-edit savehist flymake project compile
text-property-search warnings thingatpt tramp rx trampver
tramp-integration files-x tramp-message tramp-compat xdg shell pcomplete
comint ansi-osc ring parse-time iso8601 time-date format-spec ansi-color
tramp-loaddefs edmacro kmacro elpaca-menu-elpa elpaca-menu-melpa
elpaca-menu-org cl-extra help-mode delsel elpaca-use-package use-package
use-package-ensure use-package-delight use-package-diminish
use-package-bind-key bind-key easy-mmode use-package-core
elpaca-use-package-autoloads elpaca-log elpaca-ui url url-proxy
url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util url-parse auth-source eieio
eieio-core cl-macs icons password-cache json subr-x map byte-opt gv
bytecomp byte-compile url-vars mailcap cl-seq elpaca elpaca-process
cl-loaddefs cl-lib elpaca-autoloads rmc iso-transl tooltip cconv eldoc
paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode
mwheel term/pgtk-win pgtk-win term/common-win touch-screen pgtk-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq
simple cl-generic indonesian philippine 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 composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button
loaddefs theme-loaddefs faces cus-face macroexp files window
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget keymap hashtable-print-readable backquote threads dbusbind
inotify dynamic-setting system-font-setting font-render-setting cairo
gtk pgtk lcms2 multi-tty move-toolbar make-network-process
native-compile emacs)

Memory information:
((conses 16 949630 620466) (symbols 48 45647 18)
 (strings 32 336597 99666) (string-bytes 1 7588702) (vectors 16 90745)
 (vector-slots 8 1687872 523494) (floats 8 750 574)
 (intervals 56 2067 1649) (buffers 992 19))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79132; Package emacs. (Thu, 31 Jul 2025 10:16:02 GMT) Full text and rfc822 format available.

Message #8 received at 79132 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Godefroy Vannoye <godefroy.vannoye <at> gmail.com>
Cc: 79132 <at> debbugs.gnu.org
Subject: Re: bug#79132: 30.1;
 lots of overlays with box face causes high usage of redisplay_internal
Date: Thu, 31 Jul 2025 13:15:15 +0300
> Date: Thu, 31 Jul 2025 11:57:55 +0200
> From: Godefroy Vannoye <godefroy.vannoye <at> gmail.com>
> 
> While using flymake with flymake-show-diagnostics-at-end-of-line set to
> t, I notice a significant slowdown when moving the cursor up and down.
> 
> After digging a bit, the issue seems to come from a high number of
> overlays with the box face property (as flymake generates them). When I 
> change
> the face to remove the box property, I don't notice any slowdown. It is
> also possible that the slowdown mainly happens where there are multiple
> boxes on the same line (due to multiple warnings from flymake on the
> same line).
> 
> I used to profiler and saw a high CPU usage from redisplay_internal.
> 
> Tested on both pure-gtk and Xorg emacs, the slowdown happens in both
> cases.
> 
> I hope that my explanation is clear enough to give some hints on where
> to look for a fix.

Thanks, but I'm not sure what kind of fix could be found here.
Massive usage of the box face is indeed expected to make redisplay
more expensive, because the display engine needs to find where the box
face starts and ends, and that requires additional scans of the buffer
text.

Sorry.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79132; Package emacs. (Thu, 31 Jul 2025 14:22:01 GMT) Full text and rfc822 format available.

Message #11 received at 79132 <at> debbugs.gnu.org (full text, mbox):

From: Godefroy Vannoye <godefroy.vannoye <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 79132 <at> debbugs.gnu.org
Subject: Re: bug#79132: 30.1; lots of overlays with box face causes high usage
 of redisplay_internal
Date: Thu, 31 Jul 2025 16:21:31 +0200
Thanks a lot for the quick response.

Digging around a bit it seems to be almost exactly the same as bug#74691
(Long errors with flymake-show-diagnostics-at-end-of-line really slows 
movement).

I had suspicions it would be difficult. On the top of my head I could 
imagine some caching
of where the boxes need to be drawn would help, but of course it's 
easier said than done…

Another possibility could be to not draw the boxes except after some 
idle time.

I have a curiosity question: what makes box particularly more expensive 
compared to
other faces properties like underline or strike-through (for which no 
slowdown is observed)?

On 31/07/2025 12:15, Eli Zaretskii wrote:
>> Date: Thu, 31 Jul 2025 11:57:55 +0200
>> From: Godefroy Vannoye <godefroy.vannoye <at> gmail.com>
>>
>> While using flymake with flymake-show-diagnostics-at-end-of-line set to
>> t, I notice a significant slowdown when moving the cursor up and down.
>>
>> After digging a bit, the issue seems to come from a high number of
>> overlays with the box face property (as flymake generates them). When I
>> change
>> the face to remove the box property, I don't notice any slowdown. It is
>> also possible that the slowdown mainly happens where there are multiple
>> boxes on the same line (due to multiple warnings from flymake on the
>> same line).
>>
>> I used to profiler and saw a high CPU usage from redisplay_internal.
>>
>> Tested on both pure-gtk and Xorg emacs, the slowdown happens in both
>> cases.
>>
>> I hope that my explanation is clear enough to give some hints on where
>> to look for a fix.
> Thanks, but I'm not sure what kind of fix could be found here.
> Massive usage of the box face is indeed expected to make redisplay
> more expensive, because the display engine needs to find where the box
> face starts and ends, and that requires additional scans of the buffer
> text.
>
> Sorry.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79132; Package emacs. (Fri, 01 Aug 2025 07:40:02 GMT) Full text and rfc822 format available.

Message #14 received at 79132 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Godefroy Vannoye <godefroy.vannoye <at> gmail.com>
Cc: 79132 <at> debbugs.gnu.org
Subject: Re: bug#79132: 30.1; lots of overlays with box face causes high usage
 of redisplay_internal
Date: Fri, 01 Aug 2025 10:39:17 +0300
> Date: Thu, 31 Jul 2025 16:21:31 +0200
> Cc: 79132 <at> debbugs.gnu.org
> From: Godefroy Vannoye <godefroy.vannoye <at> gmail.com>
> 
> Thanks a lot for the quick response.
> 
> Digging around a bit it seems to be almost exactly the same as bug#74691
> (Long errors with flymake-show-diagnostics-at-end-of-line really slows 
> movement).

Possible, but not certain.  You said in your case the profile pointed
to redisplay_internal, not to line-move-visual.

> I had suspicions it would be difficult. On the top of my head I could 
> imagine some caching
> of where the boxes need to be drawn would help, but of course it's 
> easier said than done…

The display engine cannot cache display-related information more than
it already does, because the buffer contents and overlays (and other
relevant variables) could completely change between redisplay cycles.

> Another possibility could be to not draw the boxes except after some 
> idle time.

That should be done already, if the box face is part of font-lock
machinery.  You could try playing with jit-lock-context-time and
jit-lock-defer-time to try to change the defaults which control that.

> I have a curiosity question: what makes box particularly more expensive 
> compared to
> other faces properties like underline or strike-through (for which no 
> slowdown is observed)?

The other properties can be handled on character basis, i.e. consider
for each character separately whether it has or doesn't have the
attribute.  By contrast, the box attribute needs special processing
for the first and the last character in the run of characters that
have the box attribute: those need the vertical border drawn.  This
requires the display engine to look back and forward in the buffer in
order to determine whether the character is the first or the last in
the boxed run, and that takes additional CPU time.




This bug report was last modified 13 days ago.

Previous Next


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