-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
org-element-parse-buffer
4.5x slower in Doom vs emacs -q
#7835
Comments
Memory profile in doomemacs
CPU profile in doomemacs
|
Memory profile in `emacs -q`
CPU profile in `emacs -q`
|
|
I haven't had time to properly bisect org, but it seems that these performance issues were introduced during recent bumps. A brief history:
That's markedly improved the worst cases, but if this issue is any indications, I'm guessing we're not totally out of the woods. There is a lot of work between emacs-straight/org-mode@7a6bb09 and their HEAD (emacs-straight/org-mode@1ae978f) so it's difficult to pin-point the cause, but here are some things for you to try:
|
I added the following to packages.el (unpin! org org-contrib) and re-ran the benchmark:
Improved, but still ~2.25x. I'll dig in later tonight. |
I mean some slow down is unavoidable. Vanilla Doom enables a few expensive features that are disabled in vanilla Org/Emacs, like |
That's a good point, and maybe I'm going about this the wrong way. This issue is an XY problem. The original problem is that this file takes a long time to save. I had identified
This is my largest file by far, so it's an outlier. Maybe a better course would be to disable expensive functionality in this buffer in particular.
Looks like |
I’ve improved performance dramatically (down to <1s from ~14s) by:
|
Good finds. I'll look into adapting them to the Org module. I'll keep this open until I do. |
FYI, the CPU profile indicates that Org mode is not even byte-compiled. |
And FYI, Here's what it does when enabled -- all pretty straightforward except the find-file hook:
The find-file-hook, in turn, runs
So among other things, you are entirely disabling the replace-roam-links functionality, so the limitation you did above is moot ;-) I have some experience fiddling with this thing, so what I would actually suggest is to keep autosync-mode on, don't reinvent the wheel, and then just set the option |
I confirm that...
Expected behavior
With
emacs -q
on a 15k line org-roam node (note this is an older version of the file):Current behavior
With Doom Emacs configured with example templates on a 15k line org-roam node (note this is an older version of the file):
Steps to reproduce
Run babel blocks above.
System Information
https://pastebin.com/Q0tU1vqA
The text was updated successfully, but these errors were encountered: