When I open a new terminal it takes a couple seconds for the shell to load, when I open a new pane or window in tmux it might even take a second longer. The delay is about 3 seconds.
I'm using zsh with oh-my-zsh and the ohmyzsh plugins: git, vi-mode, history-substring-search.
My path looks like:
/home/alec/.nvm/versions/node/v14.6.0/bin:/home/alec/.composer/vendor/bin:/home/alec/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/alec/code/bin
Previously I had wondered if having a git repo on the path would be problematic. The final location in that path ~/code/bin
used to be ~/bin
and there was the .git
database inside it. Now the .git
directory is in ~/code
(which seems to me like it would prevent the shell from looking through it for executables) but this hasn't delivered any performance improvements.
I don't know any other guess-and-check possibilities, or any logical troubleshooting procedures to perform/investigate.
Any suggestions?
PS4='%D{%T.%3.} %N:%i> ' script -c 'exec zsh --login -o xtrace'
, exit, and then look into thetypescript
file where all the time is spent.script
command from. Seeman script