Emacs: Add benchmark package for startup init

This commit is contained in:
Riyyi
2022-01-31 21:43:15 +01:00
parent 91e22af9d6
commit cfd0c06fbf
2 changed files with 8 additions and 0 deletions
+2
View File
@@ -7,6 +7,8 @@
;;; Code: ;;; Code:
;; (setq debug-on-error t)
;; Defer the garbage collection during startup ;; Defer the garbage collection during startup
(setq gc-cons-threshold most-positive-fixnum) (setq gc-cons-threshold most-positive-fixnum)
(add-hook 'emacs-startup-hook (lambda () (setq gc-cons-threshold 8000000))) (add-hook 'emacs-startup-hook (lambda () (setq gc-cons-threshold 8000000)))
+6
View File
@@ -16,6 +16,12 @@
(package-refresh-contents) (package-refresh-contents)
(package-install 'use-package)) (package-install 'use-package))
(use-package benchmark-init
:ensure t
:config
;; To disable collection of benchmark data after init is complete
(add-hook 'after-init-hook 'benchmark-init/deactivate))
;; ------------------------------------- ;; -------------------------------------
;; Tangle and load configuration file ;; Tangle and load configuration file