Simplify and decouple init files
The two doom-gc-* variables in init.el couples the rest of the config to these two files. The bulk of GC/file-handler optimization was moved into core.el and simplified (all that idle-timer voodoo was overkill). Also adds (setq frame-inhibit-implied-reize t) to early-init, which speeds up startup a fair bit in some edge cases with larger fonts. squash! Simplify and decouple init files
This commit is contained in:
parent
8147bc1aee
commit
81ab3dbc5d
4 changed files with 118 additions and 136 deletions
|
@ -4,17 +4,19 @@
|
|||
;; before package and UI initialization happens.
|
||||
|
||||
;; Defer garbage collection further back in the startup process
|
||||
(setq gc-cons-threshold 268435456)
|
||||
(setq gc-cons-threshold most-positive-fixnum)
|
||||
|
||||
;; Package initialize occurs automatically, before `user-init-file' is
|
||||
;; loaded, but after `early-init-file'. Doom handles package
|
||||
;; initialization, so we must prevent Emacs from doing it early!
|
||||
;; In Emacs 27+, package initialization occurs before `user-init-file' is
|
||||
;; loaded, but after `early-init-file'. Doom handles package initialization, so
|
||||
;; we must prevent Emacs from doing it early!
|
||||
(setq package-enable-at-startup nil)
|
||||
|
||||
;; Prevent the glimpse of un-styled Emacs by setting these early.
|
||||
(add-to-list 'default-frame-alist '(tool-bar-lines . 0))
|
||||
(add-to-list 'default-frame-alist '(menu-bar-lines . 0))
|
||||
(add-to-list 'default-frame-alist '(vertical-scroll-bars))
|
||||
;; Prevent the glimpse of un-styled Emacs by disable these UI elements early.
|
||||
(push '(menu-bar-lines . 0) default-frame-alist)
|
||||
(push '(tool-bar-lines . 0) default-frame-alist)
|
||||
(push '(vertical-scroll-bars) default-frame-alist)
|
||||
|
||||
;; One less file to load at startup
|
||||
(setq site-run-file nil)
|
||||
;; Resizing the Emacs frame can be a terribly expensive part of changing the
|
||||
;; font. By inhibiting this, we easily halve startup times with fonts that are
|
||||
;; larger than the system default.
|
||||
(setq frame-inhibit-implied-resize t)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue