Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving performance #106

Open
nobiot opened this issue Nov 16, 2021 · 1 comment
Open

Improving performance #106

nobiot opened this issue Nov 16, 2021 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@nobiot
Copy link
Owner

nobiot commented Nov 16, 2021

This is to record and serve as a reminder for a issue raised in Org-mode mailing list.

Source: https://list.orgmode.org/878rxrdu46.fsf@localhost/

Ihor Radchenko has also kindly provided some test files that can be used to investigate the issue and advice.

I noticed that you are using overlays in text-clone. It may potentially
cause slowdown in large Org buffers. Of course, it does not mean that
org-transclusion should not be accepted. Just something that may be
optimised.

@yantar92
Copy link

A clarification: The example files I provided do not demonstrate overlay-related slowdown. Transclusion is slow there because of unrelated reasons and long before the file size where overlays become an issue.

CPU profiler report for the example file from my last email (reply to the linked email) is below:

    1867  54%            - funcall-interactively
    1858  53%             - org-transclusion-add-all
    1678  48%              - org-transclusion-add
     867  25%               - org-transclusion-content-insert
     400  11%                - org-transclusion-content-format-org
     400  11%                 + org-mode
     377  10%                + org-mode
      70   2%                + org-transclusion-content-highest-org-headline
     399  11%               - org-transclusion-wrap-path-to-link
     349  10%                + org-mode
      20   0%                + org-element-context
      20   0%                  org-fold-core--fix-folded-region
      10   0%                + org-element--cache-after-change
     363  10%               - org-transclusion-add-org-id
     300   8%                - org-transclusion-content-org-marker
     290   8%                 - org-transclusion-content-org-buffer-or-element
     240   6%                  + org-element-parse-buffer
      30   0%                  + org-element-interpret-data
      20   0%                  + org-element-context
      63   1%                + org-id-find
      39   1%               + org-transclusion-keyword-remove
      10   0%               + org-transclusion-keyword-string-to-plist
     180   5%              + org-transclusion-keyword-string-to-plist

josephmturner added a commit to josephmturner/org-transclusion that referenced this issue Dec 24, 2023
The `org-transclusion-with-inhibit-read-only' macro can be replaced
with `with-silent-modifications', which also brings a performance
benefit by also setting `buffer-undo-list' and
`inhibit-modification-hooks' to nil.

Potentially relevant to nobiot#106.
@nobiot nobiot pinned this issue Apr 20, 2024
@nobiot nobiot added the help wanted Extra attention is needed label Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants