GNU bug report logs - #58558
29.0.50; re-search-forward is slow in some buffers

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> posteo.net>

Date: Sun, 16 Oct 2022 01:27:02 UTC

Severity: normal

Found in version 29.0.50

Full log


Message #101 received at 58558 <at> debbugs.gnu.org (full text, mbox):

From: Ihor Radchenko <yantar92 <at> posteo.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 58558 <at> debbugs.gnu.org, larsi <at> gnus.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#58558: 29.0.50; re-search-forward is slow in some buffers
Date: Wed, 14 Dec 2022 11:40:37 +0000
Eli Zaretskii <eliz <at> gnu.org> writes:

>> I am not sure what you mean by xbacktrace.
>
> It's a command we define in src/.gdbinit.  Try this:
>
>   (gdb) source /path/to/emacs/src/.gdbinit
>   (gdb) xbacktrace
>
> But do that after catching Fmake_marker call from Fmatch_data, like
> you did before.

Ok.

Now, I disabled my custom mode-line and tied to get the backtrace for
Fmake_marker and also build_marker (as suggested by Stefan).

Disabling custom mode-line did not cause any apparent improvement in
performance.

Result:

Breakpoint is still _not_ triggered during benchmark-run call

(benchmark-progn (goto-char (point-min)) (while (re-search-forward yant/re nil t)))

build_marker is not triggered, except during redisplay and completion.
Fmake_marker is triggered a dozen of times when preparing M-: prompt and
later a couple of hundreds of times _after_ executing the benchmark:

Called a couple of hundreds of times
Lisp Backtrace:
"match-data" (0xf0c02130)
0x59846038 PVEC_COMPILED
"auto-revert-buffers--buffer-list-filter" (0xf0c020b8)
"apply" (0xf0c020b0)
"auto-revert-buffers" (0xf0c02058)
"apply" (0xf0c02050)
"timer-event-handler" (0xffffcd48)

not related.

I will now look into counting the number of for look cycles, as Stefan
suggested.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




This bug report was last modified 2 years and 64 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.