summary refs log tree commit diff
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
parentcommitting the whole configuration (diff)
downloademacs.d-2d310e468ca0202f40a9ea5ffd310d41f7d22dcb.tar.gz
some cleanup around GC
-rw-r--r--early-init.el14
-rw-r--r--init.el10
2 files changed, 14 insertions, 10 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
diff --git a/init.el b/init.el
index 361e2cd..c53ec86 100644
--- a/init.el
+++ b/init.el
@@ -4,9 +4,6 @@
 
 ;;; Code:
 
-(setq gc-cons-percentage 0.5
-      gc-cons-threshold (* 128 1024 1024))
-
 (defconst emacs-start-time (current-time))
 
 (defun report-time-since-load (&optional suffix)
@@ -20,12 +17,12 @@
 
 (fset 'yes-or-no-p 'y-or-n-p)          ; replace yes/no prompts with y/n
 
-;; set utf-8 as the default encoding
+;; UTF-8 Everywhere
 (prefer-coding-system 'utf-8-unix)
-(setq locale-coding-system 'utf-8)
-(set-language-environment 'utf-8)
+(set-default-coding-systems 'utf-8)
 (set-terminal-coding-system 'utf-8)
 (set-keyboard-coding-system 'utf-8)
+(setq locale-coding-system 'utf-8)
 
 (setq load-prefer-newer t)
 (setq init-file-debug t)
@@ -367,7 +364,6 @@
     (cursor-type 'box)                          ;; cursor is a horizontal bar
     (delete-by-moving-to-trash t)               ;; delete files by moving them to the trash
     (initial-scratch-message "")                ;; empty scratch buffer
-    (garbage-collection-messages t)             ;; log when the gc kicks in
 
     ;; bytecomp.el
     (byte-compile-verbose nil)