Skip to content

Commit 93f8511

Browse files
committed
perf: add *doom-daemon-load-eagerly option
1 parent 03d692f commit 93f8511

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

early-init.el

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
(setq init-file-debug t
4343
debug-on-error t))
4444

45+
(setq *doom-daemon-load-eagerly nil)
4546

4647
;;
4748
;;; Bootstrap

lisp/doom-lib.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,8 @@ TRIGGER-HOOK is a list of quoted hooks and/or sharp-quoted functions."
258258
(setq running? t) ; prevent infinite recursion
259259
(doom-run-hooks hook-var)
260260
(set hook-var nil))))
261-
(cond ((daemonp)
261+
(cond ((and (daemonp) (or (not (boundp '*doom-daemon-load-eagerly))
262+
*doom-daemon-load-eagerly))
262263
;; In a daemon session we don't need all these lazy loading
263264
;; shenanigans. Just load everything immediately.
264265
(add-hook 'after-init-hook fn 'append))

lisp/doom-start.el

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,10 @@ If you want to disable incremental loading altogether, either remove
196196
`doom-incremental-first-idle-timer' to nil. Incremental loading does not occur
197197
in daemon sessions (they are loaded immediately at startup).")
198198

199-
(defvar doom-incremental-first-idle-timer (if (daemonp) 0 2.0)
199+
(defvar doom-incremental-first-idle-timer (if (and (daemonp)
200+
(or (not (boundp '*doom-daemon-load-eagerly))
201+
*doom-daemon-load-eagerly))
202+
0 2.0)
200203
"How long (in idle seconds) until incremental loading starts.
201204
202205
Set this to nil to disable incremental loading.

0 commit comments

Comments
 (0)