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

From: Alan Mackenzie <[email-masked]>
Date: Wed, 12 Apr 2023 18:31:09 +0000

Hello, Stefan.

On Wed, Apr 12, 2023 at 10:06:03 -0400, Stefan Monnier wrote:
> > 1. emacs -Q
> > 2. M-: (require 'cc-langs) <RET>
> > 3. C-x b asd <RET>
> > 4. M-: parse-sexp-lookup-properties <RET> => t

> > On Emacs 28, (4) yields nil.

> I suspect that the patch below might fix the immediate problem.
> Of course, setting `parse-sexp-lookup-properties` should not have such
> a major performance impact, so maybe we should keep digging into
> the problem.

Thanks!  That's a nasty little bug for somebody who hasn't seen it
before.  I don't the Elisp manual is all that explicit about what
happens in such cases.

Just as a matter of interest, have you searched cc-defs.el for any other
places the same bug might occur?  If not, I will.

I suggest I apply your patch now-ish.

>         Stefan

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).