perf: suppress extra org features in the temp buffer

Figuring out how to indent things and folding and clock updates, etc.
consumes a great deal of time especially considering that files
are (currently) processed for /every single backlink/ even if multiple
backlinks come from the same file.

This dramatically improves the load/refresh time for the org-roam
buffer.

Fix: #2399
This commit is contained in:
Dustin Farris
2025-06-06 22:17:03 -07:00
parent d099204129
commit df4e903208

View File

@ -163,7 +163,8 @@ If FILE, set `default-directory' to FILE's directory and insert its contents."
(let ((current-org-roam-directory (make-symbol "current-org-roam-directory")))
`(let ((,current-org-roam-directory org-roam-directory))
(with-temp-buffer
(let ((org-roam-directory ,current-org-roam-directory))
(let ((org-roam-directory ,current-org-roam-directory)
(org-inhibit-startup t))
(delay-mode-hooks (org-mode))
(when ,file
(insert-file-contents ,file)