Make startup benchmark a little more accurate #353

Also sets doom-init-time first thing in doom-post-init-hook.
This commit is contained in:
Henrik Lissner 2018-01-13 15:11:28 -05:00
parent 0594f0798f
commit 47d15fdf8a
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -292,7 +292,7 @@ include all modules, enabled or otherwise."
;; error in the plugin count in exchange for faster startup. ;; error in the plugin count in exchange for faster startup.
(length doom--package-load-path) (length doom--package-load-path)
(hash-table-size doom-modules) (hash-table-size doom-modules)
(setq doom-init-time (float-time (time-subtract after-init-time before-init-time))))) (setq doom-init-time (float-time (time-subtract (current-time) before-init-time)))))
;; ;;
@ -319,7 +319,7 @@ MODULES is an malformed plist of modules to load."
(require 'server) (require 'server)
(unless (server-running-p) (unless (server-running-p)
(server-start))) (server-start)))
(add-hook 'doom-post-init-hook #'doom-packages--display-benchmark t) (add-hook 'doom-post-init-hook #'doom-packages--display-benchmark)
(message "Doom modules initialized")))) (message "Doom modules initialized"))))
(defmacro def-package! (name &rest plist) (defmacro def-package! (name &rest plist)