From cfd0c06fbf63a36e00f728d085a7eb5730b0334d Mon Sep 17 00:00:00 2001 From: Riyyi Date: Mon, 31 Jan 2022 21:24:18 +0100 Subject: [PATCH] Emacs: Add benchmark package for startup init --- .config/emacs/early-init.el | 2 ++ .config/emacs/init.el | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/.config/emacs/early-init.el b/.config/emacs/early-init.el index 107e476..3fbee02 100644 --- a/.config/emacs/early-init.el +++ b/.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))) diff --git a/.config/emacs/init.el b/.config/emacs/init.el index e5393ab..3924364 100644 --- a/.config/emacs/init.el +++ b/.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