So I'm profiling my init.el with ESUP and unfortunately I can't find a bottleneck. It's just a sum of small pieces that makes it overall \~3.2 seconds. Note that I'm using use-package with ensure t to enforce lazy loading globally with \`(require 'use-package-ensure)\` and \`(setq use-package-always-ensure t)\`.
**UPDATE**
It turns out I had ensure, but not defer, set globally. So lazy loading was actually off! Thank you to those who pointed that out. Here's the NEW ESUP output, which still **takes 2.29 secs**.
Total User Startup Time: 2.290sec Total Number of GC Pauses: 18 Total GC Time: 0.324sec
init.el:784 0.646sec 28%
(eval-when-compile
(require 'easy-mmode)
(require 'ox))
init.el:6 0.545sec 23%
(package-initialize)
init.el:758 0.252sec 11%
(set-face-attribute 'default nil
:family "Roboto Mono"
:weight 'light
:height 120)
init.el:659 0.144sec 6%
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(TeX-engine 'luatex)
'(TeX-view-program-list '(("Zathura" ("zathura %o") "")))
'(TeX-view-program-selection
'(((output-dvi has-no-display-manager)
"dvi2tty")
((output-dvi style-pstricks)
"dvips and gv")
(output-dvi "xdvi")
(output-pdf "Zathura")
(output-html "xdg-open")))
'(desktop-load-locked-desktop t)
'(desktop-restore-forces-onscreen nil t)
'(desktop-restore-frames t)
'(esup-depth 0)
'(inhibit-startup-screen t)
'(package-selected-packages
'(wrap-region org-superstar imenu-list poly-R ox-tiddly dap-mode lsp-treemacs lsp-ivy helm-lsp lsp-ui lsp-mode comment-dwim-2 ix\.el ix parsebib helm-bibtex ebib biblio org-cliplink wc-mode helpful latex-preview-pane wgrep pdf-tools sr-speedbar key-chord ox-twbs ox htmlize markdown-preview-mode ess xclip workgroups2 which-key use-package treemacs smartparens rainbow-mode poly-markdown magit iedit hl-todo helm gitignore-mode flycheck expand-region csv-mode company backup-each-save auctex anzu))
'(safe-local-variable-values
'((sr-speedbar-right-side)
(sr-speedbar-toggle . t)
(flycheck-mode)
(eval TeX-run-style-hooks "beamer")))
'(save-place-mode t)
'(scroll-bar-mode nil)
'(show-paren-mode t)
'(tool-bar-mode nil))
init.el:277 0.105sec 4%
(use-package company
:init (global-company-mode)
)
init.el:317 0.100sec 4%
(use-package flycheck
:init (global-flycheck-mode)
:config
(setq flycheck-global-modes '(not ess-r-mode))
)
init.el:311 0.079sec 3%
(use-package rainbow-mode
:init (rainbow-mode)
)
init.el:780 0.075sec 3%
(load-theme 'dracula t)
init.el:12 0.050sec 2%
(eval-when-compile
;; Following line is not needed if use-package.el is in ~/.emacs.d
(add-to-list 'load-path "<path where use-package is installed>")
(require 'use-package))
init.el:199 0.046sec 2%
(require 'ibuf-ext)
init.el:4 0.040sec 1%
(require 'package)
init.el:162 0.038sec 1%
(ffap-bindings)
init.el:256 0.036sec 1%
(use-package whitespace-cleanup-mode
:init (whitespace-cleanup-mode t))
init.el:65 0.036sec 1%
(use-package backup-each-save
:hook (after-save . backup-each-save))
init.el:299 0.028sec 1%
(use-package xclip
:init (xclip-mode)
)
init.el:307 0.026sec 1%
(use-package smartparens
:init (smartparens-mode)
)
init.el:69 0.015sec 0%
(global-auto-revert-mode 1)
init.el:107 0.015sec 0%
(use-package imenu-list
:config
(setq
imenu-list-position 'left
imenu-list-size 28
imenu-list-focus-after-activation t)
:bind ("<f7>" . imenu-list-smart-toggle))
init.el:371 0.011sec 0%
(use-package which-key
:init (which-key-mode))