unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Herman, Geza" <geza.herman@gmail.com>
Cc: 62352@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	[thread overview]
Message-ID: <83355x7sx2.fsf@gnu.org> (raw)
In-Reply-To: <51545b85-029c-a6ff-f733-e486f261f6c0@gmail.com> (geza.herman@gmail.com)

> Date: Tue, 21 Mar 2023 21:01:58 +0100
> From: "Herman, Geza" <geza.herman@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.





  reply	other threads:[~2023-03-21 20:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-21 20:01 bug#62352: Very slow scroll-down-line with a lot of text properties Herman, Geza
2023-03-21 20:26 ` Eli Zaretskii [this message]
2023-03-21 20:39   ` Herman, Géza
2023-03-21 21:58   ` Gregory Heytings
2023-03-25 11:58     ` Eli Zaretskii
2023-03-25 12:33       ` Herman, Géza
2023-03-25 12:42         ` Eli Zaretskii
2023-03-25 13:41           ` Herman, Géza
2023-03-25 14:02             ` Eli Zaretskii
2023-03-25 15:24               ` Herman, Géza
2023-03-25 16:20                 ` Eli Zaretskii
2023-03-25 17:38                   ` Herman, Géza
2023-03-25 17:49                     ` Eli Zaretskii
2023-03-25 21:39                       ` Herman, Géza
2023-03-26  4:55                         ` Eli Zaretskii
2023-03-26  7:14                           ` Herman, Géza

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83355x7sx2.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=62352@debbugs.gnu.org \
    --cc=geza.herman@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).