-
Inject profiling code
At the beginning of your .zshrc add following:
zmodload zsh/zprofand at the end add:
zprofThis will load zprof mod and display what your shell was doing durung your initialization.
-
Measure startup time
time zsh -i -c exit
Last active
November 11, 2025 15:29
-
-
Save elalemanyo/cb3395af64ac23df2e0c3ded8bd63b2f to your computer and use it in GitHub Desktop.
Debug zsh startup time
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

And if you forget the command, you may add:
alias zsh_zprof=time ZSH_DEBUGRC=1 zsh -i -c exit…so you can simply run
zsh_zprofwhenever needed.