Commit 3757c4f8f53a

Vincent Demeester <vincent@sbr.pm>
2025-05-20 22:26:18
tools/emacs: some gc configuration
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 0124e3f
Changed files (1)
tools
emacs
tools/emacs/mini/init.el
@@ -8,6 +8,15 @@
 ;; This is the "mini" version for now, but aims to become the default one.
 ;;; Code:
 
+(defun my-minibuffer-setup-hook ()
+  (setq gc-cons-threshold most-positive-fixnum))
+
+(defun my-minibuffer-exit-hook ()
+  (setq gc-cons-threshold 800000000))
+
+(setq gc-cons-threshold most-positive-fixnum)
+
+(run-with-idle-timer 1.2 t 'garbage-collect)
 
 (defconst emacs-start-time (current-time))