Disabling eager package loading in daemon

I’ve found that running Emacs as a daemon results in significantly higher startup times than running it as a new instance.

After reading through issues, it seems that Doom used to provide a way to disable eager package loading when launching a daemon instance. See this issue in particular. Forgive me if this is an error in my configuration, but the doom-incremental-load-immediately variable does not exist on my machine; this issue was from 3 years ago, so I suspect things have changed since then. I tried to set doom-incremental-first-idle-timer to 2.0 from 0, but this was not enough to get the same startup time.

I forked the Doom repository and made some small changes (including the aforementioned doom-incremental-first-idle-timer change) in my install, which seem to have the desired effect on startup time. Here’s the commit I made: perf: add *doom-daemon-load-eagerly option · srithon/doomemacs@93f8511 · GitHub.

With this change, daemon startup acts more like regular startup. However, is there a better (preferably built into Doom) way to do this? It seems that hlissner feels that in the daemon’s main use case, all packages should be loaded up-front, so it seems plausible that this functionality no longer exists in current Doom. The reason I want faster startup time is because I often restart my daemon after making changes to my config, and would like it to take as little time as possible.

System information


Loading data dump...