Sebastian Wålinder <s.walin...@gmail.com> writes:

> I write regularly in a massive org file ~160 000 lines, and experience 
> progressive slowdowns as the buffer remains open when I have the setting 
> `(setq org-fold-core-style 'text-properties)`.
>
> When the file is first opened, all operations are very fast. But as I keep 
> using, it keeps slowing down and eventually slows to a crawl where typing a 
> single character takes several seconds. However, after closing the buffer and 
> opening the file up again, the speed returns to normal.
>
> With `(setq org-fold-core-style 'overlays)` in my `early-init.el`, I have no 
> slowdown issue related to org-fold over time.
> ...
> The memory profiler reports nothing significant. It appears 
> `org-fold-core--fix-folded-region` is what's taking all the cycles. What's 
> the best way for me to proceed debugging this? 

Try the latest bugfix branch.
I recently pushed an optimization in this area:
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?h=bugfix&id=7b3b7b92e784c86c4ada1150d6e17a510b5ea3d0

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

Reply via email to