Profiling zsh startup speeds
Profiling a slow zsh startup time can be done with the builtin module zprof.
Enabling zprof
Outside of Nix systems, you can enable zprof by adding the mod to the top and bottom of your ~/.zshrc:
sh
zmodload zsh/zprof
# remainder of your .zshrc
zprofNix users can use the provided Home Manager option programs.zsh.zprof.enable:
nix
{
programs.zsh = {
enable = true;
# Enable profiling
zprof.enable = true;
};
}