perf(org): optimize org-roam node listings

org-roam-get-keyword performs some file IO to read file keywords from
all nodes. This can be slow with long node lists. With
org-roam/org-roam#1963, file title is baked into the schema, so we don't
need to do this work anymore.

Ref: org-roam/org-roam#1963
Fix: #6382
This commit is contained in:
Henrik Lissner 2022-05-09 15:38:40 +02:00
parent 0e2fa0ba19
commit 8a27eb99be
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -8,7 +8,7 @@
If there's no file-level title in the file, return empty string." If there's no file-level title in the file, return empty string."
(or (if (= (org-roam-node-level node) 0) (or (if (= (org-roam-node-level node) 0)
(org-roam-node-title node) (org-roam-node-title node)
(org-roam-get-keyword "TITLE" (org-roam-node-file node))) (org-roam-node-file-title node))
"")) ""))
;;;###autoload (autoload 'org-roam-node-doom-hierarchy "lang/org/autoload/contrib-roam2" nil t) ;;;###autoload (autoload 'org-roam-node-doom-hierarchy "lang/org/autoload/contrib-roam2" nil t)