This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
org-ql-select function could be faster by caching the buffers variable #447
Labels
You can continue the conversation there. Go to discussion →
OS/platform
Linux
Emacs version and provenance
Emacs 29.4 compiled by myself
Org version and provenance
9.7 shipped with emacs
org-ql package version and provenance
v0.8.5 (shipped with doom-emacs)
Description
I've got a usecase where I call
org-ql-select
500 times and I've noticed that the caching could be improved since thebuffers
variable is kind-of expensive to evaluate (unlessbuffers-or-files
is already a list of buffers).org-ql/org-ql.el
Lines 377 to 393 in b7d4856
I suspect many uses of
org-ql-select
pass a string or(org-agenda-files)
as the argument ofbuffers-or-files
so caching in theorg-ql-select
might make sense, but I'm not sure if the obvious implementation will handle all the edge-cases.On my machine 500 function calls to
org-ql-select
passing the output of(org-agenda-files)
take 5.8s, when passing a list of buffers it takes 1.9s so the difference is quite significant.Again, I could adapt my code to simply pass a list of buffers, but it seems to be a low-hanging performance improvement that might be beneficial for all callers.
Etc.
No response
The text was updated successfully, but these errors were encountered: