* [BUG] org-persist-write-all is slow because of use of pp [9.8-pre (release_9.7.8-713-g62cbac @ /home/viz/lib/emacs/straight/build/org/)]
@ 2024-08-10 5:10 Visuwesh
2024-08-10 12:48 ` Ihor Radchenko
0 siblings, 1 reply; 4+ messages in thread
From: Visuwesh @ 2024-08-10 5:10 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 981 bytes --]
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen. You don't know how to make a good report? See
https://orgmode.org/manual/Feedback.html#Feedback
Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------
I am using the async LaTeX preview branch and org-persist-write-all
takes a lot of time to finish executing due to the use of pp when saving
the index file. Changing org-persist-write:index to not pass a non-nil
PP argument to org-persist--write-elisp-file changes the execution time
of org-persist-write-all from 62 secs to just 8 secs. For reference,
(length org-persist--index) ;; ⇒ 1504
I have attached the profiler report for org-persist--index of much
smaller length but if required I can reproduce a report for the full one
too.
Please let me know if more information is required from my side. Thank
you.
[-- Attachment #2: org-persist-pp-slow-down.eld --]
[-- Type: application/octet-stream, Size: 373477 bytes --]
[-- Attachment #3: Type: text/plain, Size: 228 bytes --]
Emacs : GNU Emacs 31.0.50 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo version 1.18.0, Xaw scroll bars)
of 2024-08-10
Package: Org mode version 9.8-pre (release_9.7.8-713-g62cbac @ /home/viz/lib/emacs/straight/build/org/)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [BUG] org-persist-write-all is slow because of use of pp [9.8-pre (release_9.7.8-713-g62cbac @ /home/viz/lib/emacs/straight/build/org/)]
2024-08-10 5:10 [BUG] org-persist-write-all is slow because of use of pp [9.8-pre (release_9.7.8-713-g62cbac @ /home/viz/lib/emacs/straight/build/org/)] Visuwesh
@ 2024-08-10 12:48 ` Ihor Radchenko
2024-08-10 13:07 ` Visuwesh
0 siblings, 1 reply; 4+ messages in thread
From: Ihor Radchenko @ 2024-08-10 12:48 UTC (permalink / raw)
To: Visuwesh; +Cc: emacs-orgmode
Visuwesh <visuweshm@gmail.com> writes:
> I am using the async LaTeX preview branch and org-persist-write-all
> takes a lot of time to finish executing due to the use of pp when saving
> the index file. Changing org-persist-write:index to not pass a non-nil
> PP argument to org-persist--write-elisp-file changes the execution time
> of org-persist-write-all from 62 secs to just 8 secs. For reference,
>
> (length org-persist--index) ;; ⇒ 1504
>
> I have attached the profiler report for org-persist--index of much
> smaller length but if required I can reproduce a report for the full one
> too.
So much for the idea of readable index file.
Fixed, on bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f9351456e7
--
Ihor Radchenko // yantar92,
Org mode contributor,
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>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [BUG] org-persist-write-all is slow because of use of pp [9.8-pre (release_9.7.8-713-g62cbac @ /home/viz/lib/emacs/straight/build/org/)]
2024-08-10 12:48 ` Ihor Radchenko
@ 2024-08-10 13:07 ` Visuwesh
2024-08-10 13:11 ` Ihor Radchenko
0 siblings, 1 reply; 4+ messages in thread
From: Visuwesh @ 2024-08-10 13:07 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
[சனி ஆகஸ்ட் 10, 2024] Ihor Radchenko wrote:
> Visuwesh <visuweshm@gmail.com> writes:
>
>> I am using the async LaTeX preview branch and org-persist-write-all
>> takes a lot of time to finish executing due to the use of pp when saving
>> the index file. Changing org-persist-write:index to not pass a non-nil
>> PP argument to org-persist--write-elisp-file changes the execution time
>> of org-persist-write-all from 62 secs to just 8 secs. For reference,
>>
>> (length org-persist--index) ;; ⇒ 1504
>>
>> I have attached the profiler report for org-persist--index of much
>> smaller length but if required I can reproduce a report for the full one
>> too.
>
> So much for the idea of readable index file.
It is unfortunate, indeed, since the pp version of the file is really
handy when looking into org-persist issues. Though, I must mention that
the slowness reported in OP is compounded by my fairly aggressive CPU
governor settings (in hopes of improving battery life).
> Fixed, on bugfix.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f9351456e7
Thanks for the quick fix!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [BUG] org-persist-write-all is slow because of use of pp [9.8-pre (release_9.7.8-713-g62cbac @ /home/viz/lib/emacs/straight/build/org/)]
2024-08-10 13:07 ` Visuwesh
@ 2024-08-10 13:11 ` Ihor Radchenko
0 siblings, 0 replies; 4+ messages in thread
From: Ihor Radchenko @ 2024-08-10 13:11 UTC (permalink / raw)
To: Visuwesh; +Cc: emacs-orgmode
Visuwesh <visuweshm@gmail.com> writes:
>> So much for the idea of readable index file.
>
> It is unfortunate, indeed, since the pp version of the file is really
> handy when looking into org-persist issues. Though, I must mention that
> the slowness reported in OP is compounded by my fairly aggressive CPU
> governor settings (in hopes of improving battery life).
AFAIK, the underlying cause is bad scaling of `pp' algo. So, it will
only get worse (like O(N^2) worse) with increasing number of index
entries. Different CPU settings will just change the threshold when the
problem is triggered.
--
Ihor Radchenko // yantar92,
Org mode contributor,
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>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-08-10 13:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-10 5:10 [BUG] org-persist-write-all is slow because of use of pp [9.8-pre (release_9.7.8-713-g62cbac @ /home/viz/lib/emacs/straight/build/org/)] Visuwesh
2024-08-10 12:48 ` Ihor Radchenko
2024-08-10 13:07 ` Visuwesh
2024-08-10 13:11 ` Ihor Radchenko
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.