GNU bug report logs - #62352
Very slow scroll-down-line with a lot of text properties

Previous Next

Package: emacs;

Reported by: "Herman, Geza" <geza.herman <at> gmail.com>

Date: Tue, 21 Mar 2023 20:03: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: Eli Zaretskii <eliz <at> gnu.org>
To: "Herman, Geza" <geza.herman <at> gmail.com>
Cc: 62352 <at> debbugs.gnu.org
Subject: bug#62352: Very slow scroll-down-line with a lot of text properties
Date: Tue, 21 Mar 2023 22:26:01 +0200
> Date: Tue, 21 Mar 2023 21:01:58 +0100
> From: "Herman, Geza" <geza.herman <at> gmail.com>
> 
> Emacs can freeze for seconds when scroll-down-line is called multiple 
> times if the buffer contains a lot of text properties.

Not any text properties: 'face' text properties.  Right?

> To reproduce the issue without lsp-mode, execute this elisp command with 
> M-:, this will add a face to operators:
> 
> (font-lock-add-keywords 'c++-mode '(("[][~!^&\|<>:=,.\\+*/%-]" 0 'error)))
> 
> Also, bind scroll-down-line to a key, like shift-up:
> 
> (global-set-key (kbd "<S-up>") 'scroll-down-line)
> 
> Then, put the attached example.cpp into a c++ buffer, move the point to 
> the bottom, then press and hold shift-up. Emacs will update the window 
> for several scroll events, but after that it won't update the screen for 
> a while. Even after shift-up is released, Emacs needs several seconds to 
> be interactive again.

In general, any change in faces causes the display iterator to stop
and load the new face, before it continues.  They also cause drawing
on the screen to be in smaller chunks, since each stretch of
characters in the same face is drawn together.  And this example
basically changes to a new face every character.  So this is expected
to display slower than usual.

However, are you saying that this is slower in Emacs 29 than it was in
Emacs 28?  If so, bisection will be appreciated.




This bug report was last modified 2 years and 117 days ago.

Previous Next


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