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

From: Eli Zaretskii <[email-masked]>
Date: Thu, 28 Jul 2022 09:21:46 +0300

> Date: Thu, 28 Jul 2022 00:38:09 +0300
> Cc: [email-masked], [email-masked],
>  Eli Zaretskii <[email-masked]>, [email-masked]
> From: Dmitry Gutov <[email-masked]>
> 
> > Yes, occasional mis-fontification is expected.  It's a compromise 
> > between "no fontification" and "slow fontification".
> 
> I wonder now if the majority of the slowdown was caused by the 
> redisplay, whereas font-lock (which only has to run once per screenful) 
> was actually "fast enough".

To establish that, you can run font-lock-fontify-buffer, wait until it
finishes, and then try moving around and comparing that with a buffer
in which font-lock was turned off.  (Do this on master, of course,
where the changes we are discussing are not yet installed.)

In general, even after a full fontification, you should see at least
some slowdown due to the faces.  How much slowdown, quantitatively, I
don't know, but perhaps Gregory measured that as part of his work.