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: Sun, 14 Aug 2022 20:54:52 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1

On 14.08.2022 19:16, Gregory Heytings wrote:


The alternative, of course, is to pay the price of syntax-ppss on larger spans and wait the corresponding amount of time the first time the user scrolls to EOB.


Or to speed up syntax-ppss in a way or another.

I suggest you try tweaking parse-partial-sexp's implementation.

But as Gregory shows, when you get to _really_ large files (like 1 GB JSON file in his example), pressing M-> will still make you wait (I have to wait around 20 seconds).


Or when you have a slower CPU, with moderately large files.

I doubt there are any CPUs in wide use that are even 5x slower than mine.

And even 200 MB is pretty large, and not something we've been reasonable able to edit before.

But being able to choose this approach (in the absence of better upcoming alternatives) is a good thing.


The problem is (again) that what you would like does not provide any protection against modes which use widen inside their fontification routines.

Do you have examples of such modes?

Calling 'widen' inside font-lock-keywords is a bug, and the bugs should be fixed at the source.





reply via email to

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