|
From: | Dmitry Gutov |
Subject: | Re: Major modes using `widen' is a good, even essential, programming practice. |
Date: | Sun, 7 Aug 2022 20:53:58 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 |
On 07.08.2022 20:23, Eli Zaretskii wrote:
What jit-lock/font-lock actually do at the moment is to widen, then use syntax-ppss, i.e. in effect scan from BOB.Yes, and that's SLOOOWWWW!
It's not slow on files of reasonable size. E.g. even if we take xdisp.c (the file I've seen referred to in complaints on CC Mode's speed),
(benchmark 1 '(save-excursion (parse-partial-sexp (point-min) (point-max))))
reports 20-50 ms on my machine. And that result is cached too.So whatever perceived slowness is there, it most likely comes from other sources.
[Prev in Thread] | Current Thread | [Next in Thread] |