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

From: Dmitry Gutov <[email-masked]>
Date: Tue, 2 Aug 2022 00:53:13 +0300

On 01.08.2022 14:23, Gregory Heytings wrote:
>> You might also want to compare to the time to run
>>
>> (parse-partial-sexp (point-min) (point-max))
>>
>> which is a kind of "speed of light" for `syntax-ppss`.
>>
> 
> What do you mean?  With the above file (benchmark-run 1 
> (parse-partial-sexp (point-min) (point-max))) takes 55 seconds.

Then this is the base price of knowing (with confidence) whether the EOB 
position is inside a paren, inside a string, or inside a comment, all of 
which may be positioned anywhere inside the buffer.

Perhaps someone will come up with further optimizations for the 
parse-partial-sexp implementation (without changing its behavior). 
Likely not by an order of a magnitude, but who knows.