bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#56682: Fix the long lines font locking related slowdowns


From: Dmitry Gutov
Subject: bug#56682: Fix the long lines font locking related slowdowns
Date: Tue, 2 Aug 2022 17:10:53 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1

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).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]