Fix for oh-my-zsh git-svn prompt slowness

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 ~/.zshrc:

https://gist.github.com/2355834

One thought on “Fix for oh-my-zsh git-svn prompt slowness

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>