emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Tim Cross <theophilusx@gmail.com>
Cc: Max Nikulin <manikulin@gmail.com>,  emacs-orgmode@gnu.org
Subject: Re: Release 9.6
Date: Fri, 02 Dec 2022 05:06:37 +0000	[thread overview]
Message-ID: <87wn7al7he.fsf@localhost> (raw)
In-Reply-To: <86tu2eg0us.fsf@gmail.com>

Tim Cross <theophilusx@gmail.com> writes:

> One question I do have is with respect to the new folding code, the
> changes in Emacs to improve overlay performance and the correct way
> forward.
>
> On one hand, it was an immense amount of work for Ihor to implement a
> better performing solution and something I'm sure those with large org
> files will appreciate. However, on the other hand, I guess it also puts
> a greater burden from a maintenance perspective on org maintainers as
> org is now using its own unique approach to hiding/showing content
> (folding).

Note that org-fold text property implementation will remain relevant
until we drop the support of Emacs 28.

> Has anyone done any comparisons between the new overlay implementation
> in Emacs 29 and the new folding approach in org 9.6? Is there still
> sufficient performance benefit with org's approach over using Emacs
> overlays or do we need to seriously consider changing the default back
> to native Emacs overlays?

I did.
https://orgmode.org/list/87359z8ssb.fsf@163.com

    Emacs master:
     - main Org branch using text properties for folding: Elapsed time: 2.185786s (0.639190s in 4 GCs)
     - main Org branch using overlays for folding: Elapsed time: 27.244284s (0.731581s in 5 GCs)
    
    Emacs feature/noverlay:
     - main Org branch using text properties for folding: Elapsed time: 1.586936s (0.476606s in 3 GCs)
     - main Org branch using overlays for folding: Elapsed time: 2.039803s (0.724576s in 5 GCs)
    
    The improvement is very significant. GCs are mostly caused by Org
    internals staff as you can see by comparing built-in and main Org
    versions. Without GCs, overlays are on par with text properties.

overlays vs. text properties are now mostly on par modulo some more GCs
when using overlays.

In terms of maintenance, it is not that bad. org-fold supports both
overlays and text properties. I just did not implement certain features
when overlays are used.

Eventually, we can drop text property support and go back to overlays.
We do not have to abandon org-fold for that. org-fold is mostly an API
for folding. It provides more than just a replacement of overlays. Other
places in Org code now use API calls instead of directly working with
overlays.

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


      parent reply	other threads:[~2022-12-02  5:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29  6:58 Release 9.6 Bastien
2022-11-30 15:10 ` Max Nikulin
2022-11-30 16:36   ` Thomas S. Dye
2022-12-01 23:10   ` Tim Cross
2022-12-02  0:32     ` Charles Millar
2022-12-02  5:06     ` 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=87wn7al7he.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=manikulin@gmail.com \
    --cc=theophilusx@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).