From: rearman Date: Mon, 11 May 2026 19:20:41 +0000 (-0400) Subject: More tweaks to garbage collection X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=08cdc810e2c7f97bf9f03a29bd8d3a1c531034d9;p=emacsinit.git More tweaks to garbage collection Most-positive-fixnum during startup, and any time the minibuffer is open. Otherwise use the default setting. This should keep things moving quickly without having oversized memory usage. --- diff --git a/early-init.el b/early-init.el index cd25d1e..81450d7 100644 --- a/early-init.el +++ b/early-init.el @@ -4,14 +4,19 @@ ;; Code: -(setq gc-cons-threshold most-positive-fixnum - gc-cons-percentage 0.6) +(setq gc-cons-threshold most-positive-fixnum) (add-hook 'after-init-hook (lambda () - (setq gc-cons-threshold (* 1800 1000) - gc-cons-percentage 0.1 - garbage-collection-messages t))) + (setq gc-cons-threshold 800000))) + +(add-hook 'minibuffer-setup-hook + (lambda () + (setq gc-cons-threshold most-positive-fixnum))) + +(add-hook 'minibuffer-exit-hook + (lambda () + (setq gc-cons-threshold 800000))) (setq inhibit-startup-screen t inhibit-startup-buffer-menu t