Function: consult--with-increased-gc

consult--with-increased-gc is a macro defined in consult.el.

Signature

(consult--with-increased-gc &rest BODY)

Documentation

Temporarily increase the GC limit in BODY to optimize for throughput.

Source Code

;; Defined in ~/.emacs.d/elpa/consult-20260805.1130/consult.el
(defmacro consult--with-increased-gc (&rest body)
  "Temporarily increase the GC limit in BODY to optimize for throughput."
  (declare (indent 0) (debug t))
  (cl-with-gensyms (overwrite)
    `(let* ((,overwrite (> consult--gc-threshold gc-cons-threshold))
            (gc-cons-threshold (if ,overwrite consult--gc-threshold gc-cons-threshold))
            (gc-cons-percentage (if ,overwrite consult--gc-percentage gc-cons-percentage)))
       ,@body)))