Thanks for your latest diff!
The overall current performance is quite satisfactory. I describe in two cases 
as Karthik's classification.
1. When running org-latex-preview-all inside an org file (about 700 fragments), 
Emacs is not unresponsive in comparison to the past, and the fragments 
rendering is much more faster than before (taking 2-3s approximately on my 
modern processor, an R7-5800H).
2. When running save-buffer-kill-emacs, the time has been reduced from about 5 
minutes to 2-3s (turning off org-roam-autosync-mode). For my current needs, 
this speed is more than satisfactory. However, according to previous statement 
last year, this speed would rapidly decrease as the scale of the fragments 
increase because of the usage of pp, correct? 
I attach the profiler for the convenience of any future performance enhancement.
P.S. During the test, I discovered that, if someone uses org-roam and turns on 
autosync-mode, the `rename-file` function would be overloaded by 
`org-roam-db--autosync-rename-file-a`, which would occupy half of the total 
time. Turning off the autosync-mode temporarily will solve this performance 
problem.
In my view, org-persist only process those files in memory and the cache 
directory and not interactive with the org-roam-directory, right? 
P.S.2 I am pretty new to Emacs community and I cc this reply to 
emacs-orgmode@gnu.org. I hope it would appear in the org maillist archive.
Yu Huang
---- Replied Message ----
FromIhor Radchenko<yanta...@posteo.net>Date3/27/2025 
01:28To黄煜<2100012...@stu.pku.edu.cn>SubjectRe: org-persist-write:index takes 
minutes to run
黄煜 <2100012...@stu.pku.edu.cn> writes:
Dear Ihor,
I am just a user on the latest commit of Teco and I meet the same problem when 
execute (org-persist-write-all}) after exiting. It takes about 5 minutes since 
I have a large number of fragments.
Except for removing the hook directly (I do not know what is the consequence of 
the brute-force approach actually), is there any choice to moderate this “bug”?
You can try the last diff I shared in this thread.
Or you can disable caching of latex previews (the Teco's branch should
have such option).
-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
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>

Attachment: after-diff-power & autosync-off profiler
Description: Binary data


Attachment: after-diff-power & autosync-on profiler
Description: Binary data

Reply via email to