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


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ihor Radchenko <yantar92 <at> posteo.net>
Cc: 58558 <at> debbugs.gnu.org, larsi <at> gnus.org, monnier <at> iro.umontreal.ca
Subject: bug#58558: 29.0.50; re-search-forward is slow in some buffers
Date: Mon, 10 Apr 2023 16:40:51 +0300
> From: Ihor Radchenko <yantar92 <at> posteo.net>
> Cc: monnier <at> iro.umontreal.ca, larsi <at> gnus.org, 58558 <at> debbugs.gnu.org
> Date: Mon, 10 Apr 2023 12:24:23 +0000
> 
> >> 43.82%--Fre_search_forward
> >>  --43.81%--search_command
> >>   --43.78%--search_buffer
> >>    --43.78%--search_buffer_re
> >>     --43.33%--re_search_2
> >>      --36.39%--re_match_2_internal
> >>       --21.90%--SYNTAX_TABLE_BYTE_TO_CHAR
> >>        --21.57%--BYTE_TO_CHAR
> >>         --21.49%--buf_bytepos_to_charpos
> >> 
> >> Not sure if it is telling much.
> >
> > How does this compare with a "fast" session doing the same?
> 
> "fast" (emacs 28) session does not have this call tree contributing
> significantly.

Hmm... I though when you just start a new Emacs session of Emacs 30 it
also is fast, and becomes progressively slower with time?  Or am I
confused?

> re_match_2_internal calls SYNTAX_TABLE_BYTE_TO_CHAR in a loop. So, if
> something strange is happening with the loop, we may be calling
> buf_bytepos_to_charpos more.

I believe perf is capable of showing the number of calls as well?  Can
you compare the number of calls between the two versions?




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

Previous Next


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