Re: org-persist-write:index takes minutes to run

2025-04-11 Thread Ihor Radchenko
Karthik Chikmagalur writes: > It's definitely better than the version of org-persist on main right > now. Emacs blocks intermittently over the ~3 seconds it takes to > preview 600 fragments in my test file, but it's not completely blocked > for 30 seconds like before. Emacs does not block when

Re: org-persist-write:index takes minutes to run

2025-04-05 Thread Yu Huang
>I feel that it is too long and weird, so I restart my Emacs daemon, and the >results do not change. Just moments ago, I test it in other way. I stay the buffer view in the end of my org file, where there are many fragments. When I execute (my-org-latex-preview-benchmark), it only takes 0.5s-1s,

Re: org-persist-write:index takes minutes to run

2025-03-29 Thread Ihor Radchenko
Karthik Chikmagalur writes: >>> 1. When running `save-buffers-kill-emacs', the time is down from several >>> minutes to about 10 seconds -- still undesirably long but not egregious. >>> This is the profile org-persist-delay-kill-emacs.eld. >> >> Ok. What about write time distribution now? > > Sor

Re: org-persist-write:index takes minutes to run

2025-03-28 Thread Karthik Chikmagalur
> I tried to find the reason in my LaTeX header uasge. > If I ban the usage of #+LATEX_HEADER: \usepackage{mathpazo}, the test > time reduced to 3.5s. (I love this font set) > If I ban the fontenc + mathpazo, it remains 3.5s. > If I ban the lmodorn + fontenc + mathpazo, it reduces to 1.9s. This is

Re: org-persist-write:index takes minutes to run

2025-03-28 Thread Yu Huang
I tried to find the reason in my LaTeX header uasge. If I ban the usage of #+LATEX_HEADER: \usepackage{mathpazo}, the test time reduced to 3.5s. (I love this font set) If I ban the fontenc + mathpazo, it remains 3.5s. If I ban the lmodorn + fontenc + mathpazo, it reduces to 1.9s. Other packages li

Re: org-persist-write:index takes minutes to run

2025-03-28 Thread Yu Huang
the result of health-check is as follows. I don't know why "Caching with org-persist" is ON. The value of `org-latex-preview-cache` is exactly "temp" now. -- Your LaTeX preview process Precompile with latex -> LaTeX Compile with pdflatex -> Convert to SVG with dvisvgm pdflatex

Re: org-persist-write:index takes minutes to run

2025-03-28 Thread Karthik Chikmagalur
> > 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

Re: org-persist-write:index takes minutes to run

2025-03-28 Thread Yu Huang
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.

Re: org-persist-write:index takes minutes to run

2025-03-28 Thread Karthik Chikmagalur
> 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 al

Re: org-persist-write:index takes minutes to run

2025-03-28 Thread Yu Huang
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 (with

Re: org-persist-write:index takes minutes to run

2025-03-28 Thread Karthik Chikmagalur
> 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 fast

Re: org-persist-write:index takes minutes to run

2025-03-27 Thread Ihor Radchenko
黄煜 writes: > 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 decre

Re: org-persist-write:index takes minutes to run

2025-03-27 Thread 黄煜
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 renderin

Re: org-persist-write:index takes minutes to run

2025-03-18 Thread Ihor Radchenko
Karthik Chikmagalur writes: >> What if you try the attached diff? > > Two cases, profiles for both are attached: > > 1. When running `save-buffers-kill-emacs', the time is down from several > minutes to about 10 seconds -- still undesirably long but not egregious. > This is the profile org-persis

Re: org-persist-write:index takes minutes to run

2025-03-17 Thread Karthik Chikmagalur
Ihor, I mistakenly replied only to you instead of the list just now. Let me know if I should resend that email to the list. Karthik Ihor Radchenko writes: > Karthik Chikmagalur writes: > >>> My guess is 7999433067 or 2a620113c1, but need to confirm. >> >> Yes it's one of those two, I'm not s

Re: org-persist-write:index takes minutes to run

2025-03-17 Thread Ihor Radchenko
Karthik Chikmagalur writes: > I mistakenly replied only to you instead of the list just now. Let me > know if I should resend that email to the list. Please do.

Re: org-persist-write:index takes minutes to run

2025-03-17 Thread Ihor Radchenko
Karthik Chikmagalur writes: >> My guess is 7999433067 or 2a620113c1, but need to confirm. > > Yes it's one of those two, I'm not sure which of the two it is as I > haven't had the time to reset the branch and test each one. What if you try the attached diff? diff --git a/lisp/org-persist.el b/l

Re: org-persist-write:index takes minutes to run

2025-03-16 Thread Karthik Chikmagalur
>> Do you know which commit introduced the slowdown? >> ... > > My guess is 7999433067 or 2a620113c1, but need to confirm. Yes it's one of those two, I'm not sure which of the two it is as I haven't had the time to reset the branch and test each one. Karthik

Re: org-persist-write:index takes minutes to run

2025-03-16 Thread Ihor Radchenko
Ihor Radchenko writes: > Do you know which commit introduced the slowdown? > ... My guess is 7999433067 or 2a620113c1, but need to confirm. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at . Support Org development at

Re: org-persist-write:index takes minutes to run

2025-03-16 Thread Ihor Radchenko
Karthik Chikmagalur writes: > I can confirm that this slowdown currently also happens when generating > LaTeX previews, when we cache them for the first time with > `org-persist-register'. It's less of an issue because most Org files > contain fewer than 800 LaTeX fragments, but it still locks u

Re: org-persist-write:index takes minutes to run

2025-03-16 Thread Ihor Radchenko
Karthik Chikmagalur writes: > I'm attaching a profiler profile for one of these calls to > `save-buffers-kill-emacs'. Judging from the profile, most of the time is spent writing data. > This is probably relevant: I am on Tecosaur's fork of Org mode, > > https://code.tecosaur.net/tec/org-mode >