From 94a1c9b53fb2826997a5a9e562d2e51dfd8c4ab5 Mon Sep 17 00:00:00 2001 From: Marc Date: Wed, 21 Apr 2021 10:41:42 +0200 Subject: [PATCH] first early-init stuff --- config.org | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/config.org b/config.org index 5c9a215..baa78b7 100644 --- a/config.org +++ b/config.org @@ -101,7 +101,8 @@ FILTER is function that runs after the process is finished, its args should be :name (if name name "async-process") :filter (if filter filter - (lambda (process output) (message (s-trim output)))))) + (lambda (process output) (message output))))) +; (lambda (process output) (message (s-trim output)))))) ;; Examples: ;; @@ -127,7 +128,7 @@ https://blog.d46.us/advanced-emacs-startup/ (time-subtract after-init-time before-init-time))) gcs-done))) -(setq gc-cons-threshold (* 50 1000 1000)) +;(setq gc-cons-threshold (* 50 1000 1000)) #+end_src #+BEGIN_SRC emacs-lisp @@ -168,6 +169,16 @@ Maybe turn it on again at some point before the next major emacs upgrade (setq byte-compile-warnings '(cl-functions)) #+end_src +* Performance Optimization + +** Garbage Collection +Make startup faster by reducing the frequency of garbage collection. +Set gc-cons-threshold (default is 800kb) to maximum value available, to prevent any garbage collection from happening during load time. + +#+BEGIN_SRC emacs-lisp :tangle early-init.el +(setq gc-cons-threshold most-positive-fixnum) +#+END_SRC + * Default settings :PROPERTIES: :ID: 3512d679-d111-4ccd-8372-6fc2acbc0374