oh-my-zsh slow, but only for certain Git repo
It could be the theme calling git and rvm stuff after every command.
For me, changing ZSH_THEME="juanghurtadoto"
to ZSH_THEME="miloshadzic"
removed the 2 second delay after every command completely.
Themes can be found at https://github.com/robbyrussell/oh-my-zsh/wiki/themes
You can add this to your git config and zsh won't check the status anymore
git config --add oh-my-zsh.hide-status 1
git config --add oh-my-zsh.hide-dirty 1
Explanation
There are two central git functions in in lib/git.zsh:
git_prompt_info()
parse_git_dirty()
Each Method has a git config switch to disable it:
oh-my-zsh.hide-status
oh-my-zsh.hide-dirty
Some themes create their own git queries and sometimes ignore these flags.
Oh_my_zsh seems to be slow for some repos because it checks the status of the repo after each command. This behaviour can be overridden in the new version of .oh_my_zsh . Just Uncomment the following line in .zshrc:
DISABLE_UNTRACKED_FILES_DIRTY="true"
After this, restart your terminal or run the following:
source ~/.zshrc