mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-24 13:02:52 +00:00
org-agenda-prepare-buffers: Avoid quadratic complexity when merging tags
* lisp/org.el (org-agenda-prepare-buffers): Use the shortest list as the first argument in `org--tag-add-to-alist'. `org--tag-add-to-alist' is looping over the first argument. When we use the accumulated tags as the first argument, each buffer tag will need to be looped over N_buffers/2 times on average, creating quadratic complexity. Avoid this. Reported in https://orgmode.org/list/62f66552.050a0220.ed346.ac05SMTPIN_ADDED_BROKEN@mx.google.com
This commit is contained in:
parent
b8a0ddf52f
commit
6ad65f3332
|
@ -15196,8 +15196,8 @@ When a buffer is unmodified, it is just killed. When modified, it is saved
|
|||
(append org-todo-keyword-alist-for-agenda org-todo-key-alist))
|
||||
(setq org-tag-alist-for-agenda
|
||||
(org--tag-add-to-alist
|
||||
org-tag-alist-for-agenda
|
||||
org-current-tag-alist))
|
||||
org-current-tag-alist
|
||||
org-tag-alist-for-agenda))
|
||||
;; Merge current file's tag groups into global
|
||||
;; `org-tag-groups-alist-for-agenda'.
|
||||
(when org-group-tags
|
||||
|
|
Loading…
Reference in a new issue