Browse Source

Emacs: Add benchmark package for startup init

master
Riyyi 2 years ago
parent
commit
cfd0c06fbf
  1. 2
      .config/emacs/early-init.el
  2. 6
      .config/emacs/init.el

2
.config/emacs/early-init.el

@ -7,6 +7,8 @@
;;; Code:
;; (setq debug-on-error t)
;; Defer the garbage collection during startup
(setq gc-cons-threshold most-positive-fixnum)
(add-hook 'emacs-startup-hook (lambda () (setq gc-cons-threshold 8000000)))

6
.config/emacs/init.el

@ -16,6 +16,12 @@
(package-refresh-contents)
(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

Loading…
Cancel
Save