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

From: Gregory Heytings <[email-masked]>
Date: Wed, 27 Jul 2022 06:55:32 +0000

>
> But I'm seeing incorrect fontification. Is this one expected?
>

Yes, occasional mis-fontification is expected.  It's a compromise between 
"no fontification" and "slow fontification".

>
> Perhaps something to do with the number 40000?
>

There is no magical number 40000 in the implementation, the buffer limits 
to which fontification-functions are constrained are determined 
dynamically, depending on the width and height of the window.

My guess in this specific case is that the first instance of 
"Downloadify.Container" was fontified by the previous call to 
fontification-functions, and that the next chunk of text in which the two 
other instances of "Downloadify.Container" are contained was fontified by 
the next call to fontification-functions, which did not have access 
anymore to the place where Downloadify.Container is defined.