Move gc treshold to early-init, and keep it high-ish

This commit is contained in:
larstvei 2023-06-14 02:06:39 +02:00
parent f2437ada46
commit 7b8b524d8f

View File

@ -162,12 +162,9 @@
initialization. Here, we set the ~gc-cons-threshold~ to a ridiculously large initialization. Here, we set the ~gc-cons-threshold~ to a ridiculously large
number, and restore the default value after initialization. number, and restore the default value after initialization.
#+begin_src emacs-lisp #+begin_src emacs-lisp :tangle early-init.el
(let ((old-gc-treshold gc-cons-threshold)) (setq gc-cons-threshold (* 100 1024 1024))
(setq gc-cons-threshold most-positive-fixnum)
(add-hook 'after-init-hook
(lambda () (setq gc-cons-threshold old-gc-treshold))))
#+end_src #+end_src