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

From: Gregory Heytings <[email-masked]>
Date: Wed, 10 Aug 2022 12:31:24 +0000

>> Another option might be to add some limits to the algorithm in buffers 
>> with long lines, without disabling it completely.
>
> It already has such limits and other optimizations.
>

Yes, I meant making them a bit lower in such cases.

>
> Inhibiting the BPA is an option if it is known that the buffer doesn't 
> include ant R2L characters anywhere; otherwise some braces/parens could 
> be displayed incorrectly mirrored.
>

But is there an efficient way to determine if that the buffer doesn't 
include any R2L characters?

>
> If you remove the 3 closing braces/brackets at EOB and the corresponding 
> opening braces/brackets, does navigation become significantly faster?
>

Yes, removing the 3 brackets at positions 1, 22, 23 and 19538, 19539 and 
19540 solves that problem.  In fact, just removing the brackets at 1, 22 
and 23 solves that problem.  You can see the same problem in 
dictionary.json, just removing the first character makes C-n and C-p 
faster at BOB.