GNU bug report logs - #45898
27.1; wedged in redisplay again

Previous Next

Package: emacs;

Reported by: Devon Sean McCullough <Emacs-hacker2018 <at> jovi.net>

Date: Fri, 15 Jan 2021 18:14:01 UTC

Severity: normal

Found in version 27.1

Full log


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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: gerd.moellmann <at> gmail.com, psainty <at> orcon.net.nz, larsi <at> gnus.org,
 Emacs-hacker2018 <at> jovi.net, 45898 <at> debbugs.gnu.org
Subject: Re: bug#45898: 27.1; wedged in redisplay again
Date: Thu, 30 Jun 2022 13:22:29 -0400
>> and then tried to move around in the buffer, search with Isearch, and
>> insert a few chars.
>> I don't notice any difference with or without the patch :-(
>
> If you start moving with C-n or C-v, Emacs becomes unusable
> approximately around the same buffer position with and without the
> patch?

Yup.  And moving at the end of the file with C-p and M-v is also "about
as bad".

> If so, I guess the expensive part is somewhere else.

Unsuprisingly so: none of `C-n/C-p/C-v/...` involve font-lock or
jit-lock either during their operation or during the
subsequent redisplay phase in the current code: the one-line is all
fontified once and for all when you open the file and after that
font-lock is not involved any more (until you make an edit, that is).

The only operation where I can see an improvement is when editing the
file near the beginning where the `master` code take a couple seconds
per edit (the time to refontify the whole line/buffer) whereas with the
patch it takes a fraction of a second (definitely not immediate, tho).

It also does open up the file a bit faster, but it pays for it by taking
more time to jump to the end:

- open file:  master=5s  patch=3s
- M->      :  master=10s patch=14s

[ Note: these time measurements are *very* approximate. ]

So while we do get some benefit occasionally by chunking, the chunking
itself slows us down.

> I'd install this patch regardless, because it sounds like TRT not to
> let syntactic fontifications run amok this way.  We do similar stuff
> in bidi.c for similar reasons.

OK, I pushed it to `master`.  The improvement is far from convincing,
but I tend to agree that it's "The Right Thing".






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

Previous Next


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