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

From: Eli Zaretskii <[email-masked]>
Date: Sun, 16 Oct 2022 14:21:23 +0300

> Cc: [email-masked]
> From: Lars Ingebrigtsen <[email-masked]>
> Date: Sun, 16 Oct 2022 13:01:48 +0200
> 
> > I just switched between Emacs 28 and Emacs 29 and I do note that
> > right after loading Emacs and the Org file, Emacs 29 takes similar time
> > with Emacs 28.
> 
> Huh, very odd.  Almost as something is...  fragmenting in the buffer?
> We do have many caches and stuff -- perhaps something is...  degrading?
> 
> I guess some C-level perf measurements would be handy here, but that's
> not something I know much about.  Anybody?

AFAIU, we use elaborate caching for regular expressions, so maybe that
is related.  Stefan, any ideas?