Set GC threshold high at start of initialisation
I did have this in here before and the code to set it back was still at the end of the file, so not sure what happened there. I guess I accidentally removed it at some point.
This commit is contained in:
parent
1f7d38e03f
commit
68fc323efd
21
config.org
21
config.org
@ -2,6 +2,17 @@
|
||||
#+AUTHOR: Camden Dixie O'Brien
|
||||
#+ATTR_LATEX: :float t
|
||||
|
||||
* Prelude
|
||||
Before doing anything else, set a higher [[help:gc-cons-threshold][gc-cons-threshold]] (I'm
|
||||
using 100 MiB here) so that we're not garbage collecting during
|
||||
initialisation to make startup a little faster. We'll save the
|
||||
original value to restore it at the end of initialisation.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq original-gc-cons-threshold gc-cons-threshold)
|
||||
(setq gc-cons-threshold (* 100 1024 1024))
|
||||
#+end_src
|
||||
|
||||
* Customize
|
||||
Hey, customize, leave my ~/.emacs.d/init.el alone!
|
||||
|
||||
@ -1667,12 +1678,10 @@
|
||||
(setq god-exempt-predicates nil)
|
||||
#+end_src
|
||||
|
||||
* Fin
|
||||
Now that start-up is finished, [[help:gc-cons-threshold][gc-cons-threshold]] and
|
||||
[[help:gc-cons-percentage][gc-cons-percentage]] need to be set back to reasonable values to avoid
|
||||
memory usage getting too high.
|
||||
* Coda
|
||||
Now that initialization is finished, [[help:gc-cons-threshold][gc-cons-threshold]] should be set
|
||||
back to its default value:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq gc-cons-threshold 1000000)
|
||||
(setq gc-cons-percentage 0.2)
|
||||
(setq gc-cons-threshold original-gc-cons-threshold)
|
||||
#+end_src
|
||||
|
Loading…
x
Reference in New Issue
Block a user