diff --git a/core/core-packages.el b/core/core-packages.el index e967baf22..0344337ff 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -284,14 +284,15 @@ Used by `require!' and `depends-on!'." '(t)) doom-modules))) -(defun doom-packages--display-benchmark () - (message "Doom loaded %s packages across %d modules in %.03fs" - ;; Certainly imprecise, especially where custom additions to - ;; load-path are concerned, but I don't mind a [small] margin of - ;; error in the plugin count in exchange for faster startup. - (length doom-package-load-path) - (hash-table-size doom-modules) - (setq doom-init-time (float-time (time-subtract (current-time) before-init-time))))) +(defun doom-packages--benchmark () + (format "Doom loaded %s packages across %d modules in %.03fs" + ;; Certainly imprecise, especially where custom additions to + ;; load-path are concerned, but I don't mind a [small] margin of + ;; error in the plugin count in exchange for faster startup. + (- (length load-path) (length doom-site-load-path)) + (hash-table-size doom-modules) + (or doom-init-time + (setq doom-init-time (float-time (time-subtract (current-time) before-init-time)))))) ;; diff --git a/core/core.el b/core/core.el index 3b9e5398b..67702a6ab 100644 --- a/core/core.el +++ b/core/core.el @@ -166,8 +166,7 @@ ability to invoke the debugger in debug mode." (require 'server) (unless (server-running-p) (server-start))) - (doom-packages--display-benchmark)) - + (message "%s" (doom-packages--benchmark))) ;; If you forget to reset this, you'll get stuttering and random freezes! (setq gc-cons-threshold 16777216 gc-cons-percentage 0.1 diff --git a/modules/ui/doom-dashboard/config.el b/modules/ui/doom-dashboard/config.el index fc72313b6..a4099afd4 100644 --- a/modules/ui/doom-dashboard/config.el +++ b/modules/ui/doom-dashboard/config.el @@ -262,10 +262,7 @@ controlled by `+doom-dashboard-pwd-policy'." (propertize (+doom-dashboard--center +doom-dashboard--width - (format "Loaded %d packages in %d modules in %.02fs" - (length doom-package-load-path) - (hash-table-size doom-modules) - doom-init-time)) + (doom-packages--benchmark)) 'face 'font-lock-comment-face) "\n\n"))