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

From: Dmitry Gutov <[email-masked]>
Date: Tue, 26 Jul 2022 23:52:35 +0300

On 26.07.2022 14:45, Eli Zaretskii wrote:
>> Perhaps it's due to font-lock logic in that it has to match from the
>> beginning of a line (not sure we'd want to abandon that promise,
>> though). Or maybe something else.
> It isn't font-lock, at least not in all major modes.  It's the display
> engine itself that sometimes needs to go to the beginning of the line.
> When it does, going back gets slower with font-lock than without.
> This is why you see slower redisplay when you go deeper into a long
> line.

Makese sense: the text only has to be fontified once, but all redisplays 
are slowed down (on master), not just the first one.