GNU bug report logs - #78766
100-4000x redisplay slowdown with vscroll>0 and make-cursor-line-fully-visible=t

Previous Next

Package: emacs;

Reported by: JD Smith <jdtsmith <at> gmail.com>

Date: Wed, 11 Jun 2025 23:09:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Full log


View this message in rfc822 format

From: JD Smith <jdtsmith <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, 78766 <at> debbugs.gnu.org
Subject: bug#78766: 100-4000x redisplay slowdown with vscroll>0 and make-cursor-line-fully-visible=t
Date: Fri, 13 Jun 2025 10:07:05 -0400
[Message part 1 (text/plain, inline)]
Quick followup.  I was able to instrument the single function `set_iterator_to_next' to track total call count and distribution of call times of this core function.  Since the instrumentation slowed the test down so much, I profiled moving (forward-char) by just 3 chars with redisplay in a partially visible top line, using the slow setting of make-cursor-line-fully-visible=t.  

The total call count per character moved in the slow case is enormous: >800K.

[PastedGraphic-5.png (image/png, inline)]
[Message part 3 (text/plain, inline)]

I compared this against the fast case in which make-cursor-line-fully-visible=nil.  Here I moved 56 * 20 iterations = 1,120 chars.  You can see the call count is much, much smaller (although with similar run times per function call):

[PastedGraphic-6.png (image/png, inline)]
[Message part 5 (text/plain, inline)]

I.e. about 280 calls per char moved.  In both cases the time series of calls looks fairly normal:

[PastedGraphic-8.png (image/png, inline)]
[Message part 7 (text/plain, inline)]


This bug report was last modified today.

Previous Next


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