Re: [PERFORMANCE] Why some org code is so deep invoked?

2022-08-13 Thread Christopher M. Miles
Ihor Radchenko writes: > "Christopher M. Miles" writes: > >> After applying this patch, seems deep level has improved. > > Thanks for testing! > Applied onto main via 6ad65f333. > https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=6ad65f3332937dee81b1a7dc56a6dca7bd4865ae > Thanks

Re: [PERFORMANCE] Why some org code is so deep invoked?

2022-08-13 Thread Ihor Radchenko
"Christopher M. Miles" writes: > After applying this patch, seems deep level has improved. Thanks for testing! Applied onto main via 6ad65f333. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=6ad65f3332937dee81b1a7dc56a6dca7bd4865ae > I attched the profiler report in attachments

Re: [PERFORMANCE] Why some org code is so deep invoked?

2022-08-12 Thread Ihor Radchenko
"Christopher M. Miles" writes: > 668 28%- > org-agenda-prepare-buffers > ... > 523 22% - > org--tag-add-to-alist I have a suspicion where the bottleneck is. Can you try the attached patch? >Fr

Re: [PERFORMANCE] Why some org code is so deep invoked?

2022-08-12 Thread Ihor Radchenko
"Christopher M. Miles" writes: >> Also, I suggest to use M-x write-file in the profiler buffer when >> sharing something as deeply nested as you got. The resulting file is >> much more comfortable to view - it will preserve all the actual profiler >> data. > > I see, I tried it, it indeed kept th

Re: [PERFORMANCE] Why some org code is so deep invoked?

2022-08-12 Thread Christopher M. Miles
Bill Burdick writes: > You'll have this with recursive code and recursion is fairly normal in Lisp > programs. > > -- Bill I think this profiler report invocation stack is not recursive code. WDYT? > > On Fri, Aug 12, 2022 at 8:22 AM Christopher M. Miles > wrote: > > Ihor Radchenko writes

Re: [PERFORMANCE] Why some org code is so deep invoked?

2022-08-12 Thread Christopher M. Miles
Ihor Radchenko writes: > "Christopher M. Miles" writes: > >>> I do not see much issue with deep nesting of the code. >> >> Is this deep nested code normal in Emacs Lisp? >> >> Usually (based on my less than 20 times profiling experience), Emacs >> wouldn't have deeper code than 40 levels. But m

Re: [PERFORMANCE] Why some org code is so deep invoked?

2022-08-12 Thread Ihor Radchenko
"Christopher M. Miles" writes: >> I do not see much issue with deep nesting of the code. > > Is this deep nested code normal in Emacs Lisp? > > Usually (based on my less than 20 times profiling experience), Emacs > wouldn't have deeper code than 40 levels. But my attachment profiler > report has

Re: [PERFORMANCE] Why some org code is so deep invoked?

2022-08-12 Thread Bill Burdick
You'll have this with recursive code and recursion is fairly normal in Lisp programs. -- Bill On Fri, Aug 12, 2022 at 8:22 AM Christopher M. Miles wrote: > > Ihor Radchenko writes: > > > "Christopher M. Miles" writes: > > > >> When I profiling Org Agenda generation, I found that org code is

Re: [PERFORMANCE] Why some org code is so deep invoked?

2022-08-12 Thread Christopher M. Miles
Ihor Radchenko writes: > "Christopher M. Miles" writes: > >> When I profiling Org Agenda generation, I found that org code is deeply >> invoked in Emacs profiler report. >> >> My Question: >> >> - What reason caused this situation? >> - Can Org Mode optimize those deeply invoked code? > > Coul

Re: [PERFORMANCE] Why some org code is so deep invoked?

2022-08-11 Thread Ihor Radchenko
"Christopher M. Miles" writes: > When I profiling Org Agenda generation, I found that org code is deeply > invoked in Emacs profiler report. > > My Question: > > - What reason caused this situation? > - Can Org Mode optimize those deeply invoked code? Could you please clarify what exactly is yo

[PERFORMANCE] Why some org code is so deep invoked?

2022-08-11 Thread Christopher M. Miles
When I profiling Org Agenda generation, I found that org code is deeply invoked in Emacs profiler report. My Question: - What reason caused this situation? - Can Org Mode optimize those deeply invoked code? I have option ~org-agenda-start-with-clockreport-mode~ enabled. And have lot files in