From c43f7d6131ab6e5bd7492a1a23f3e569d54ead43 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sun, 18 May 2025 10:43:42 +0200 Subject: [PATCH] Try to reduce memory footprint Do this by periodically running the garbage collector. This is inspired by https://jackjamison.xyz/blog/emacs-garbage-collection/, although so far I did not experience the stuttering problems mentioned there --- early-init.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/early-init.el b/early-init.el index bb53ce9..7efa3d0 100644 --- a/early-init.el +++ b/early-init.el @@ -11,8 +11,9 @@ (add-hook 'emacs-startup-hook (lambda () - (setq gc-cons-threshold (* 100 1024 1024) ; 100mb - gc-cons-percentage 0.1))) + (setq gc-cons-threshold (* 100 1024 1024) ; 100mb + gc-cons-percentage 0.1) + (run-with-idle-timer 1.2 t #'garbage-collect))) (setq frame-resize-pixelwise t frame-inhibit-implied-resize t)