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>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: JD Smith <jdtsmith <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 78766 <at> debbugs.gnu.org
Subject: bug#78766: 100-4000x redisplay slowdown with vscroll>0 and make-cursor-line-fully-visible=t
Date: Mon, 16 Jun 2025 17:40:46 -0400
[Message part 1 (text/plain, inline)]
> On Jun 15, 2025, at 1:00 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> if (MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P
>> (w, MATRIX_ROW (w->desired_matrix, w->cursor.vpos)))
>>   return SCROLLING_FAILED;
>> else
>>   goto too_near_end;
>> }
>>      rc = SCROLLING_SUCCESS;
>> 
>> I get no artifacts, and it seems to do what I'd expect — if you try to move point onto a partially visible top row, the window is recentered according to scroll-conservatively.
>> 
>> Seems to work normally with line-move and tall images.  I will run with it for a while to see if anything else appears.
> 
> If that works for you, it's fine by me.  I thought that recentering
> will effectively disable the effect of vscroll, and so assumed it will
> be unacceptable for your package.

Your instincts were good.  The patch was fine in almost all scenarios, but had problems for images taller than the window.  In this situation you have no choice but to keep point on a partially visible top line.  The inherent recentering negatively affects line-move across tall images, especially noticeable for multiple tall lines in a row.

If we use your top row test as enclosed, this seems to do what we want: avoid the long loop and resulting big slowdown, while permitting the cursor to fall on a partially visible top line.

Thanks for your efforts.


[Message part 2 (text/html, inline)]
[slow_vscroll_make_cursor_fully_visible.patch (application/octet-stream, attachment)]
[Message part 4 (text/html, inline)]

This bug report was last modified 31 days ago.

Previous Next


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