perf: add additional startup optimizations

Also switches `expand-file-name` calls with the much faster
`file-name-concat` where possible.
This commit is contained in:
Henrik Lissner 2022-09-13 14:06:56 +02:00
parent 42d88421ba
commit 57a91235bd
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
2 changed files with 53 additions and 19 deletions

View file

@ -2,8 +2,6 @@
;;; Commentary:
;;; Code:
(require 'doom-modules)
;;
;;; Custom hooks
@ -310,8 +308,15 @@ If RETURN-P, return the message as a string instead of displaying it."
(autoload 'doom-initialize-packages "doom-packages")
(eval-after-load 'package '(require 'doom-packages))
(eval-after-load 'straight '(doom-initialize-packages))
(require 'doom-modules)
;; Load all things.
;; Undo any problematic startup optimizations; from this point, I make no
;; assumptions about what might be loaded in userland.
(when (get 'load-suffixes 'initial-value)
(setq load-suffixes (get 'load-suffixes 'initial-value)
load-file-rep-suffixes (get 'load-file-rep-suffixes 'initial-value)))
;; Load user config + modules
(doom-initialize-modules)
(provide 'doom-start)