Morgan Smith <morgan.j.sm...@outlook.com> writes: >> We need a real-life justification, not a theoretical one. > ... > I agree with all your points and I'm sorry for sending noise. However, I > think > I actually found a real-life justification. > > It turns out that by replacing `org-cached-entry-get' with > `org-entry-get' the performance of my `org-clock-sum' calls got much > better for my specific use case. Due to benchmarking with my local > changes in place (sorry), I accidentally attributed this performance > increase to byte-compiling the return of `org-make-tags-matcher'. > > These numbers are also with my `org-clock-sum' rewrite patch applied. > They are in a 3M file of almost exclusivly clocking data. The filters I > use are "CATEGORY={blah}" for one clock table and "-ignore-ITEM={foo}" > for 9 others.
I got similar results using "-ignore-ITEM={foo}" :match. The reason behind the slowdown is the fact that `org-cached-entry-get' forces calculating _all_ the possible properties. In my case, this leads to 10x slowdowns due to custom blocker function when calculating BLOCKED property. I thus conclude that your patch makes sense, and we can obsolete `org-cached-entry-get', especially since atomic property lookups are partially cached on the latest Org mode via org-element-cache mechanisms. However, please move the obsolete function definition to org-compat instead of removing it completely. We do it to avoid unexpected breakage for people and libraries who happen to use this public function. Also, with the old approach, if you observe slowdowns, you likely have some property being calculated slowly (like BLOCKED in my case). Do you happen to know which property is it for your setup? -- 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>