* Slowdown with large headings in view
@ 2023-11-10 20:35 Sebastian Wålinder
2023-11-11 9:50 ` Ihor Radchenko
0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Wålinder @ 2023-11-10 20:35 UTC (permalink / raw)
To: emacs-orgmode
Hello!
I have massive org-mode file with thousands of SRC blocks.
As the file grew, I started to get very poor performance, but setting `org-fold-core--ignore-modifications` to `t` solved it.
However, I still get very poor performance when a lot of folded headings are in view. It gets slower as headings with more text hidden inside its fold come into view.
I have tried running the profiler to find out what the issue is, but no matter how laggy Emacs gets, the profiler records practically no CPU samples or memory usage.
When the massive org buffer is in view and showing large folded headlines, any command run is very slow, even if the action is performed in another buffer entirely. It returns to normal when no window is showing the headings, as well as when I bring the folded headings out of view or unfold them.
I tried disabling font-lock, but it didn't do anything.
How can I profile this, or does anyone have a guess of what could be causing it?
Thank you!
Sebastian
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Slowdown with large headings in view
2023-11-10 20:35 Slowdown with large headings in view Sebastian Wålinder
@ 2023-11-11 9:50 ` Ihor Radchenko
0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2023-11-11 9:50 UTC (permalink / raw)
To: Sebastian Wålinder; +Cc: emacs-orgmode
Sebastian Wålinder <s.walinder@gmail.com> writes:
> I have massive org-mode file with thousands of SRC blocks.
>
> As the file grew, I started to get very poor performance, but setting `org-fold-core--ignore-modifications` to `t` solved it.
>
> However, I still get very poor performance when a lot of folded headings are in view. It gets slower as headings with more text hidden inside its fold come into view.
>
> I have tried running the profiler to find out what the issue is, but no matter how laggy Emacs gets, the profiler records practically no CPU samples or memory usage.
>
> When the massive org buffer is in view and showing large folded headlines, any command run is very slow, even if the action is performed in another buffer entirely. It returns to normal when no window is showing the headings, as well as when I bring the folded headings out of view or unfold them.
This is expected. The problem is with Emacs redisplay engine that cannot
easily handle large number of text properties - on C level.
You can try to set `org-fold-core--optimise-for-huge-buffers' to
'(grab-invisible) locally in the problematic Org file - it should reduce
the number of text properties used at the cost of not preserving folded
drawers when folding the containing heading.
--
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-11 9:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-10 20:35 Slowdown with large headings in view Sebastian Wålinder
2023-11-11 9:50 ` Ihor Radchenko
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).