summary refs log tree commit diff
path: root/early-init.el
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2024-04-02 19:40:53 -0700
committerFranck Cuny <franck@fcuny.net>2024-04-02 19:40:53 -0700
commit2d310e468ca0202f40a9ea5ffd310d41f7d22dcb (patch)
treeb050851b4cb0923a32918e36e08176b3d9dd45ec /early-init.el
parentcommitting the whole configuration (diff)
downloademacs.d-2d310e468ca0202f40a9ea5ffd310d41f7d22dcb.tar.gz
some cleanup around GC
Diffstat (limited to '')
-rw-r--r--early-init.el14
1 files changed, 11 insertions, 3 deletions
diff --git a/early-init.el b/early-init.el
index ab93a23..0312190 100644
--- a/early-init.el
+++ b/early-init.el
@@ -4,6 +4,10 @@
 
 ;;; Code:
 
+;; make garbage collector less invasive
+(setq gc-cons-threshold most-positive-fixnum)
+(setq gc-cons-percentage 0.6)
+
 ;; disable GUI elements
 (scroll-bar-mode -1)      ; hide the scroll bar
 (tool-bar-mode -1)        ; hide the tool bar
@@ -14,10 +18,14 @@
 (setq use-dialog-box nil)        ;; do not show GUI dialogs
 (setq inhibit-startup-screen t)  ;; hide the startup screen
 
-;; don't report warnings and errors related to native compilation
-(setq native-comp-async-report-warnings-errors nil)
-
 ;; increase font size
 (set-face-attribute 'default nil :height 130)
 
+(add-hook
+ 'emacs-startup-hook
+ (lambda (&rest _)
+   (setq garbage-collection-messages t) ;; log when the gc kicks in
+   (setq gc-cons-threshold 16777216)    ;; 16mb
+   (setq gc-cons-percentage 0.1)))
+
 ;;; early-init.el ends here