mirror of
https://github.com/larstvei/dot-emacs.git
synced 2024-11-26 07:28:31 +00:00
Fix faster startup time
The gc-cons-threshold wasn't reset! I think this caused some lag, due to long gc breaks.
This commit is contained in:
parent
d6e1d07dab
commit
3d81cb5162
17
init.org
17
init.org
@ -158,15 +158,18 @@
|
||||
|
||||
#+end_src
|
||||
|
||||
A common optimization is to temporarily disable garbage collection during
|
||||
initialization. Here, we set the ~gc-cons-threshold~ to a ridiculously large
|
||||
number, and restore the default value after initialization.
|
||||
** Faster startup
|
||||
|
||||
#+begin_src emacs-lisp :tangle early-init.el
|
||||
A common optimization is to temporarily disable garbage collection during
|
||||
initialization. Here, we set the ~gc-cons-threshold~ to a ridiculously large
|
||||
number, and restore the default value after initialization.
|
||||
|
||||
(setq gc-cons-threshold (* 100 1024 1024))
|
||||
|
||||
#+end_src
|
||||
#+begin_src emacs-lisp :tangle early-init.el
|
||||
(setq gc-cons-threshold most-positive-fixnum)
|
||||
(add-hook 'after-init-hook
|
||||
(lambda ()
|
||||
(setq gc-cons-threshold (* 1024 1024 20))))
|
||||
#+end_src
|
||||
|
||||
* Packages
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user