emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Release 9.6


From: Ihor Radchenko
Subject: Re: Release 9.6
Date: Fri, 02 Dec 2022 05:06:37 +0000

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.
87359z8ssb.fsf@163.com">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>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]