]> git.earman.xyz Git - emacsinit.git/commitdiff
More tweaks to garbage collection
authorrearman <rearman@r717.net>
Mon, 11 May 2026 19:20:41 +0000 (15:20 -0400)
committerrearman <rearman@r717.net>
Mon, 11 May 2026 19:20:41 +0000 (15:20 -0400)
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

index cd25d1e3c309d1ea9a43d80d183c8b9616fef35a..81450d71231cb0d97c3c7f13ef79e6f213f52b10 100644 (file)
@@ -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