emacs-devel
[Top][All Lists]
Advanced

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

Re: Org mode and Emacs (was: Convert README.org to plain text README whi


From: Ihor Radchenko
Subject: Re: Org mode and Emacs (was: Convert README.org to plain text README while installing package)
Date: Wed, 15 Jun 2022 13:48:05 +0800

Eli Zaretskii <eliz@gnu.org> writes:

>> This is exactly what I meant. To run org-make-manuals from interactive
>> Emacs session.
>
> I've run org-texinfo-export-to-texinfo instead.  Is that OK?

It is a valid option. org-make-manuals just opens the file and runs
org-texinfo-export-to-texinfo.

> Here's the profile, collected after loading ox-texinfo.el (NOT .elc):
>
>           35  54% - ...
>           31  48%    Automatic GC
>           10  15%             - org-macro--collect-macros
>            5   7%                org-macro--find-keyword-value
>            2   3%              - org-macro--find-date
>            2   3%                 org-macro--find-keyword-value
>            6   9%              org-export--delete-comment-trees
>            4   6%              org-export-expand-include-keyword

The common feature of all the above functions is that they are
structured as:
(goto-char 1) (while (re-search-forward regexp) (do-stuff))

The fact that no-sublevels are revealed by the profiler signifies that
it is regexp search that is likely taking a long time.

Note that I currently experience a significant degradation in
re-search-forward performance on some Org file using Emacs 29 master,
but not Emacs 28 and earlier.

What will happen if you run
(progn (goto-char 1) (while (re-search-forward "^\\*+ " nil t)))
right after exporting. Does it take siginficant amount of time?
What if you run M-: (org-macro--collect-macros) directly in the buffer?
Is it also slow? Is the profiler data more detailed in such case?

Best,
Ihor



reply via email to

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