5

I have been trying to make the start-up times better. Almost all of my init.el is broken into use-package declarations like this:

(use-package x ...)
(use-package y ...)
(use-package z ...)

I want to start optimising those parts of the init.el that take the longest. Is there a way to do something like,

(use-package x ...)
; print load time for x
(use-package y ...)
; print load time for y
(use-package z ...)
; print load time for z

I know for the entire file you can do something like this (message (time-subtract after-init-time before-init-time))

Drew
  • 75,699
  • 9
  • 109
  • 225
scribe
  • 930
  • 4
  • 15

1 Answers1

6

This does it:

(setq
  use-package-verbose t
  use-package-minimum-reported-time 0)

We get in *Messages*:

Loading package x...done (0.021s)
Configuring package x...done (0.020s)
Loading package y...done (0.025s)
Configuring package y...done (0.020s)
Loading package z...done (0.041s)
Configuring package z...done (0.020s)
scribe
  • 930
  • 4
  • 15