GNU bug report logs -
#58558
29.0.50; re-search-forward is slow in some buffers
Previous Next
Full log
Message #149 received at 58558 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Ihor Radchenko <yantar92 <at> posteo.net> writes:
>> Did you try to see how the number of markers in the buffer evolves
>> with the up-time?
>
> Is there any way to get the number of buffer markers from Elisp?
I finally got back to this and implemented a small subr to count
number of buffer markers:
DEFUN ("buffer-markers", Fbuffer_markers, Sbuffer_markers, 0, 0, 0,
doc: /* Return the number of markers in current buffer.*/)
(void)
{
struct Lisp_Marker *tail;
int count = 0;
for (tail = BUF_MARKERS (current_buffer); tail; tail = tail->next)
count++;
return make_fixnum (count);
}
Then, I tracked how the number of markers evolves in my problematic
buffer when building agenda. On master and on Emacs 28 (where the agenda
is building 10x faster).
As you can see on the attached graph, the number of markers is ~1000, and
it is not significantly different for the two Emacs versions.
So, the number of markers itself does not look like the real culprit.
I have no better ideas for now except slowly bisecting Emacs (again).
[marker-count.png (image/png, attachment)]
[Message part 3 (text/plain, inline)]
--
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.