From c32d1ce92fc64a5b1beb164e8f95af6e9fbe57d3 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 25 Feb 2021 12:37:27 -0600 Subject: Message about startup time --- config.org | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'config.org') diff --git a/config.org b/config.org index 5225df9..6386b86 100644 --- a/config.org +++ b/config.org @@ -1185,6 +1185,26 @@ I'm going to try it for now. #'hook--gc-when-unfocused) #+end_src +** Startup time + +Just for me to know, and in case I ever want to make it snappier. This function +is from [[https://blog.d46.us/advanced-emacs-startup/][Joe Schafer]]. + +As a benchmark, on Windows, =emacs -Q= starts up in *0.188585* seconds, and +=emacs -q= starts in *0.373297*. + +#+begin_src emacs-lisp :noweb-ref hooks + (defun hook--message-startup-time () + "Message Emacs' startup time." + (message "Emacs ready in %s with %d garbage collections." + (format "%.2f seconds" + (float-time (time-subtract after-init-time + before-init-time))) + gcs-done)) + + (add-hook 'emacs-startup-hook #'hook--message-startup-time) +#+end_src + * Files ** Encoding -- cgit 1.4.1-21-gabe81