aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Wilken2024-01-30 16:50:01 +0100
committerTimo Wilken2024-01-30 16:50:39 +0100
commite3e9ab077a8fcdb6c49678a548c2785dbe736718 (patch)
tree6d0acd1b03c7dbebb9483fc159433df86063b1e9
parent84c2a0dd855482eda7d23fb0c7a424e4742e70ed (diff)
Use emacs-gcmh to optimise garbage collection
-rw-r--r--tw/home.scm1
-rw-r--r--tw/home/files/emacs-init.el6
2 files changed, 7 insertions, 0 deletions
diff --git a/tw/home.scm b/tw/home.scm
index 91afa373..ee72b669 100644
--- a/tw/home.scm
+++ b/tw/home.scm
@@ -329,6 +329,7 @@
;; Emacs general
emacs
emacs-use-package
+ emacs-gcmh
emacs-eglot
emacs-counsel
emacs-counsel-dash sqlite ; emacs-counsel-dash requires the sqlite3 binary
diff --git a/tw/home/files/emacs-init.el b/tw/home/files/emacs-init.el
index 38eb358c..4e405cf5 100644
--- a/tw/home/files/emacs-init.el
+++ b/tw/home/files/emacs-init.el
@@ -121,6 +121,12 @@ If CREATE is true and the resulting directory does not exist, create it."
;; Some packages below have `:commands (...) :demand t'.
;; We need :commands for the byte-compiler, but we want to load the package immediately.
+(use-package gcmh ; "garbage collector magic hack": run GC when not in focus
+ :config (gcmh-mode +1)
+ :custom
+ (gcmh-verbose t "Show an informative message when garbage collecting.")
+ :diminish gcmh-mode)
+
;; Look and feel
(set-face-attribute 'default nil :family "Hermit" :height 100)
;; For some reason, Emacs doesn't detect italic support, and falls back to