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

From: Eli Zaretskii <[email-masked]>
Date: Tue, 16 Aug 2022 15:46:08 +0300

> From: Ihor Radchenko <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked],
>   [email-masked]
> Date: Tue, 16 Aug 2022 20:25:57 +0800
> 
> > More importantly, when I wrote the above, I wasn't thinking about
> > fontifications, I was thinking about the rest of the display code,
> > which always skips invisible characters, and skips them using
> > relatively fast search for text properties, not the much slower
> > iteration through the text one character at a time.
> 
> Just in case, please note that Org does not touch 'invisible text
> property to hide text. Instead, we set char-property-alias-alist
> remapping several other text properties with different non-nil values
> into 'invisible. This also means that functions like
> `next-single-property-change' may not skip the whole invisible chunk in
> one go. Not sure if it is important.

I don't think I understand what you are saying, but as long as
whatever you do causes the relevant text not to be displayed, it means
the display engine did understand the text is invisible and refrained
from displaying it.  Which means it skipped it, as it does with any
invisible text.