emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: "Sebastian Wålinder" <s.walinder@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-fold style text-properties slowdown
Date: Thu, 22 Jun 2023 10:11:17 +0000	[thread overview]
Message-ID: <87legbdcxm.fsf@localhost> (raw)
In-Reply-To: <87pm5oe3t0.fsf@nixos.mail-host-address-is-not-set>

Sebastian Wålinder <s.walinder@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	other threads:[~2023-06-22 10:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-22  0:30 org-fold style text-properties slowdown Sebastian Wålinder
2023-06-22 10:11 ` Ihor Radchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87legbdcxm.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=s.walinder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).