Subject: bug#58558: 29.0.50; re-search-forward is slow in some buffers

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 16 Oct 2022 11:37:18 +0200

Ihor Radchenko <[email-masked]> writes:

>> Is there anything special about buffers where you see these slowdowns?
>
> This is a large complex Org buffer.
>
>> For instance, a large number of text properties or overlays?
>>
>> (length (object-intervals (current-buffer)))
>
> => 101075 (took over 10sec to complete the command)

If you switch the buffer to `clean-mode' (which should remove all text
props), does the slowdown disappear?  In that case, it seems likely that
the slowdown is connected to text properties, somehow.