org-make-tags-matcher: Byte-compile the returned function

* lisp/org.el (org-make-tags-matcher): Byte-compiling the constructed
function yields noticeable improvements in at least clocksum
generation.

Link: https://orgmode.org/list/CH3PR84MB3424390023D1A552D57395FAC51B2@CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM
This commit is contained in:
Ihor Radchenko 2024-04-29 19:46:31 +03:00
parent 89c68683f9
commit 3e11b2eb88
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 1 deletions

View File

@ -11737,7 +11737,7 @@ See also `org-scan-tags'."
(or tagsmatcher todomatcher t))))
(when org--matcher-tags-todo-only
(setq matcher `(and (member todo org-not-done-keywords) ,matcher)))
(cons match0 `(lambda (todo tags-list level) ,matcher)))))
(cons match0 (byte-compile `(lambda (todo tags-list level) ,matcher))))))
(defun org--tags-expand-group (group tag-groups expanded)
"Recursively expand all tags in GROUP, according to TAG-GROUPS.