I am not kidding you in fact.
In each test, I execute
#+begin_src elisp
(org-latex-preview-clear-cache)
(setq org-latex-preview-cache 'temp)
#+end_src
and compile \(\alpha\), after the precompilation hint vanishes, I execute
(my-org-latex-preview-benchmark), and the result is always around 5.5s.
I think this time is mistaken, since by my naked eyes, the fragments around
\(\alpha\) only take 0.5s-1s to be compiled and shown.
Yu Huang
---- Replied Message ----
FromKarthik Chikmagalur<karthikchikmaga...@gmail.com>Date3/29/2025 12:30ToYu
Huang<hyto...@stu.pku.edu.cn>CcIhor Radchenko<yanta...@posteo.net>,
emacs-orgmode@gnu.org<emacs-orgmode@gnu.org>SubjectRe: org-persist-write:index
takes minutes to run
Could you run this code, then run M-x my-org-latex-preview-benchmark
on your file and report the time? (You should avoid the
precompilation first by previewing a single fragment first.)
Ok, I test several times, in an org file with about 700 fragments. I
test first in my current workspace (without restarting). When turning
on precompilation, the time is stable around 5.5 seconds; while when
turnning off precompilation, the time is stable around 6 seconds.
We want to avoid counting the precompilation time, as it is not relevant
to the org-persist issues Ihor is looking into.
Steps:
1. Leave precompilation on (default settings)
2. Run M-x org-latex-preview-clear-cache in the buffer.
3. Preview ONE fragment in the buffer. This will cause precompilation.
4. Now run M-x my-org-latex-preview-benchmark
I'm interested in the time it reports.
Repeat steps 1-4 but with org-latex-preview-cache set to 'temp.
With a powerful CPU like yours, I would expect < 2 seconds for both.
Karthik