GNU bug report logs - #56682
Fix the long lines font locking related slowdowns

Previous Next

Package: emacs;

Reported by: Gregory Heytings <gregory <at> heytings.org>

Date: Thu, 21 Jul 2022 18:01:01 UTC

Severity: normal

Done: Gregory Heytings <gregory <at> heytings.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 56682 <at> debbugs.gnu.org, gregory <at> heytings.org, monnier <at> iro.umontreal.ca
Subject: bug#56682: Fix the long lines font locking related slowdowns
Date: Tue, 2 Aug 2022 17:10:53 +0300
On 02.08.2022 05:27, Eli Zaretskii wrote:
>> syntax-ppss cache is a list of checkpoints spread along the buffer.
>>
>> After a modification, only the checkpoints below it are invalidated (to
>> be recomputed on-demand later).
> So a suitably-concocted replace command will still invalidate a lot of
> that cache, right?

For any cache, one can invent an operation that would result in 
thrashing it repeatedly.

A regular search-replace should work well enough, though. Because when 
the buffer is long, the user is likely, on average, to spend a lot more 
time examining the occurrences and deciding whether to replace each one. 
And since the operation goes from top to bottom, this will likely 
invalidate the list of caches once, and then rebuild it from the 
beginning (or from wherever the first replacement was).




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

Previous Next


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