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

From: Gregory Heytings <[email-masked]>
Date: Sun, 31 Jul 2022 22:45:38 +0000

>> IOW, the issue for which I wanted to hear your opinion was whether you 
>> think it's okay to preclude, in a buffer with long lines, all 
>> pre/post-command-hooks from accessing the entire buffer.
>
> Yes, I think that's reasonable.  There will inevitably be many modes out 
> there that'll wedge themselves in the presence of gargantuan lines, and 
> limiting these hooks is a reasonable line of defence.
>

I've now done so, in a new branch feature/long-lines-improvements (to 
avoid breaking master).  A nice bonus is that it is not necessary anymore 
to disable flyspell-mode or flymake-mode for example, even in huge files.