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

From: Ihor Radchenko <[email-masked]>
Date: Mon, 10 Apr 2023 14:55:09 +0000

Eli Zaretskii <[email-masked]> writes:

>> > 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?

My original bug report is about agenda generation being slow because of
re-search-forward slowdown. Later, I tried to simplify the recipe and
found that direct calls to re-search-forward become slower over time
(but still with my setup).

Originally, agenda generation is slower on master compared to Emacs 28
even right after startup.

In my last message and perf data, I have been looking into agenda generation.

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

I can only see
https://www.brendangregg.com/blog/2014-07-03/perf-counting.html, but it
appears to be only for built-in events. Do you know how to count calls
to specific function using perf? I am not familiar at all with perf.

-- 
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>