Subject: bug#71644: 30.0.50; Severe slowdown in larger files with markers beginning in emacs 29+

From: Ihor Radchenko <[email-masked]>
Date: Wed, 26 Jun 2024 12:35:55 +0000

Eli Zaretskii <[email-masked]> writes:

> And questions to Ihor: what are the reasons Org creates these markers?
> In particular, is there any way to know or guess whether these markers
> will be distributed more-or-less evenly over the buffer text, or
> clustered near some specific positions?  Also, does Org move these
> markers frequently, or do they stay put once created?

In this particular case, with the reproducer we are using here, Org does
not create markers. `councel-outline' does - for every headline in
buffer with marker pointing to the beginning of each headline.
These markers are distributed as headlines do.

Org mode may also create markers in some scenarios. Also at headlines,
but not necessarily _all_ headlines. org-agenda creates markers for
every headline that is displayed in agenda (matches agenda search
criterion). org-refile creates markers for each top level heading (by
default). org-goto creates markers for each heading down to level 5.

Org mode does not move these markers frequently, except markers created
by agenda, when a heading is killed/yanked via
org-cut-special/org-paste-subtree or org-refile commands.

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