I had a problem with after-init-hook which would (while supposedly
keeping (emacs-init-time) under 1.2 seconds) take ages to start emacs
just due to how many things were starting up using it. So I removed
all the after-init-hook functions and instead aggressively demand the
stuff I need and defer everything else through ":defer", ":after",
":hook" and ":general".
Happy to say my boot time is now actually 1.2 seconds without
compilation.
The URL for bootstrap.el has changed as a result of straight now being
under a group rather than a user. Just means I need to change it
here. While doing so, I update the bootstrap version as well.
Used esup to figure out some points of pain, then fixed them. Also
set gc-cons-threshold at start of init.el really high, then reset
after finished loading.
This solves the bug with custom.el where it randomly resets and
forgets what I setup there already. Found this out through
the custom.el info, where setting a custom file yourself requires
loading it in post.
To remove the ~(require 'cl)~ dependency, I wrote my own reduce for
boolean values, recursive, which should do the trick. Mostly just to
remove the annoying "haha no cl library anymore".
Set to 4 workers at the start to make compilation at least as fast as
possible: my laptop has 4 cores so it'll just slow it down until early
compilation is done, while my desktop can still keep going as it has 8
threads. In config.org this is setup correctly so the rest of the
config (which is the much larger part) uses a system dependent number
of cores.
When emacs is launched standalone, it makes sense to optimise towards
smaller load times through lazy loading. However, when Emacs is in
server or daemon there's no point holding back. Just load everything
most of the necessary stuff such that on first emacsclient launch we
have everything available for use.
This is a smarter Emacs literate config. The way it works is simple:
- If no config output files exist, compile them. Otherwise just load
the config
- Add a hook when exiting emacs such that the config is compiled and
ready for next call.
This makes it so that load time is fast and compile occurs at a more
opportune time than at init.