I was dying a slow death from the slowness of my zsh prompt when using oh-my-zsh‘s git plugin and a repository managed by git-svn. I finally decided to do something about it today.
I tracked the slowness down to the
parse_git_dirty function in
oh-my-zsh/lib/git.zsh. This function calls
git status which seems to be quite slow in my environment. My fix was to replace the oh-my-zsh version of the
git_prompt_info function with a version that doesn’t call
parse_git_dirty. This means that I can’t get the little checkmark (“âœ””) or “X” (well actually “âœ—”) that shows whether my working copy is dirty or not, but it’s worth it to me to not have my prompt lag like crazy.
To fix this, I pasted the following into my