Increase gc-cons-threshold during startup

This should reduce startup time on some systems.
This commit is contained in:
Aaron Jensen 2018-01-28 10:35:01 -08:00 committed by syl20bnr
parent 1499c4fae6
commit 7f558084f1
1 changed files with 9 additions and 3 deletions

12
init.el
View File

@ -12,9 +12,15 @@
;; Without this comment emacs25 adds (package-initialize) here
;; (package-initialize)
;; Increase gc-cons-threshold, depending on your system you may set it back to a
;; lower value in your dotfile (function `dotspacemacs/user-config')
(setq gc-cons-threshold 100000000)
;; Avoid garbage collection during startup.
(setq gc-cons-threshold 402653184
gc-cons-percentage 0.6)
(add-hook 'emacs-startup-hook
(lambda ()
;; Increase gc-cons-threshold from default, depending on your system you may set it back to a
;; lower value in your dotfile (function `dotspacemacs/user-config')
(setq gc-cons-threshold 100000000
gc-cons-percentage 0.1)))
(load-file (concat (file-name-directory load-file-name)
"core/core-versions.el"))