From 08cdc810e2c7f97bf9f03a29bd8d3a1c531034d9 Mon Sep 17 00:00:00 2001 From: rearman Date: Mon, 11 May 2026 15:20:41 -0400 Subject: [PATCH] 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. --- early-init.el | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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 -- 2.39.5