Disable garbage collection during Emacs startup
Taken from https://protesilaos.com/emacs/dotemacs, nice idea :)
This commit is contained in:
parent
b3a1689741
commit
256f378c76
|
@ -2,4 +2,14 @@
|
||||||
|
|
||||||
(setq package-user-dir (expand-file-name "elpa" user-emacs-directory))
|
(setq package-user-dir (expand-file-name "elpa" user-emacs-directory))
|
||||||
|
|
||||||
|
;; From https://protesilaos.com/emacs/dotemacs: temporarily increase the GC
|
||||||
|
;; threshold on startup to speed up booting. Reenable GC limits as soon as
|
||||||
|
;; Emacs is started.
|
||||||
|
|
||||||
|
(setq gc-cons-threshold most-positive-fixnum
|
||||||
|
gc-cons-percentage 0.5)
|
||||||
|
|
||||||
|
(add-hook 'emacs-startup-hook
|
||||||
|
(lambda ()
|
||||||
|
(setq gc-cons-threshold (* 100 1024 1024) ; 100mb
|
||||||
|
gc-cons-percentage 0.1)))
|
||||||
|
|
1
init.el
1
init.el
|
@ -153,7 +153,6 @@
|
||||||
history-delete-duplicates t
|
history-delete-duplicates t
|
||||||
track-eol t
|
track-eol t
|
||||||
garbage-collection-messages nil
|
garbage-collection-messages nil
|
||||||
gc-cons-threshold (* 100 1024 1024) ; 100mb
|
|
||||||
read-process-output-max (* 1024 1024) ; 1mb
|
read-process-output-max (* 1024 1024) ; 1mb
|
||||||
next-error-message-highlight t
|
next-error-message-highlight t
|
||||||
help-enable-symbol-autoload t
|
help-enable-symbol-autoload t
|
||||||
|
|
Loading…
Reference in New Issue