Subject: bug#71644: 30.0.50; Severe slowdown in larger files with markers beginning in emacs 29+

From: Eli Zaretskii <[email-masked]>
Date: Tue, 25 Jun 2024 16:44:48 +0300

> From: Ihor Radchenko <[email-masked]>
> Cc: Mitchell <[email-masked]>, Eli Zaretskii <[email-masked]>,
>  [email-masked]
> Date: Tue, 25 Jun 2024 09:30:00 +0000
> 
> Stefan Monnier <[email-masked]> writes:
> 
> > One other thing I notice: If I use Emacs-29 but with Org-9.5.5 (i.e., the
> > version included in Emacs-28.2) the recipe doesn't show the slowdown.
> > ...
> > If someone more familiar with the changes that occurred in Org around
> > that time could try and track down the specific change that triggers the
> > problem, that would be appreciated.
> 
> The biggest suspect is the fact that Org switched from overlay-based
> folding to text property-based between Org 9.5 and Org 9.6.

But overlays aren't supposed to be faster than text properties, so I'm
unsure why this change would have such an effect.

However, it is important to establish the facts first, and try to
explain them later.  So if you could come up with a change to try on
top of Org 9.6 that would change it back to use overlays for folding,
we could try that and see if the slowdown goes away, and take it from
there.