Previous: Profiling Key Operations, Up: Performance Optimization [Contents]
During the cache-build process, Org-roam generates a lot of in-memory data-structures (such as the Org file’s AST), which are discarded after use. These structures are garbage collected at regular intervals (see (elisp)info:elisp#Garbage Collection).
Org-roam provides the option org-roam-db-gc-threshold
to temporarily change
the threshold value for GC to be triggered during these memory-intensive
operations. To reduce the number of garbage collection processes, one may set
org-roam-db-gc-threshold
to a high value (such as most-positive-fixnum
):
(setq org-roam-db-gc-threshold most-positive-fixnum)