Variable: org-roam-db-gc-threshold

org-roam-db-gc-threshold is a customizable variable defined in org-roam-db.el.

Value

800000

Documentation

The value to temporarily set the gc-cons-threshold threshold to.

During org-roam-db-sync, Emacs can pause multiple times to perform garbage collection because of the large number of temporary structures generated (e.g. parsed ASTs).

gc-cons-threshold is temporarily set to org-roam-db-gc-threshold during this operation, and increasing gc-cons-threshold will help reduce the number of GC operations, at the cost of memory usage. Tweaking this value may lead to better overall performance.

For example, to reduce the number of GCs to the minimum, on machines with large memory one may set it to most-positive-fixnum.

Source Code

;; Defined in ~/.emacs.d/elpa/org-roam-20260224.1637/org-roam-db.el
(defcustom org-roam-db-gc-threshold gc-cons-threshold
  "The value to temporarily set the `gc-cons-threshold' threshold to.
During `org-roam-db-sync', Emacs can pause multiple times to
perform garbage collection because of the large number of
temporary structures generated (e.g. parsed ASTs).

`gc-cons-threshold' is temporarily set to
`org-roam-db-gc-threshold' during this operation, and increasing
`gc-cons-threshold' will help reduce the number of GC operations,
at the cost of memory usage. Tweaking this value may lead to
better overall performance.

For example, to reduce the number of GCs to the minimum, on
machines with large memory one may set it to
`most-positive-fixnum'."
  :type 'int
  :group 'org-roam)