Hacker News new | ask | show | jobs
by melvinmt 4782 days ago
I love using zsh (in combination with oh-my-zsh) on OSX but the only thing I've noticed after using it a year is that it's becoming very very slow. As in, it usually takes me 5-10 seconds to login to a new session (locally) and be able to see the prompt and type something.

Tab auto completion takes a second or two (even for files).

Combined with the git plugin I have enabled (which does "git status" on every prompt in a git folder) it's almost unbearable to work with.

I've looked into it a couple of times, there are some people with the same issues on oh-my-zsh's github, but I could never really solve it.

Would any pro zsh user know what my issue could be? I'm seriously considering going back to bash, I use it at work and it reminds me how fast the terminal can be.

6 comments

I moved from OMZ to Prezto for this reason (its a fork of oh my). But prezto is slow too.

The only recourse I think is to go back to a clean zsh and build your own .zshrc. There are other leaner zsh "frameworks"[1] I have read of, but i intend going back to stock zsh soon.

1) - see zshuery and zsh-m on github.

If you like zsh don't go back to bash, just ditch oh-my-zsh and roll your own config gradually, or try prezto (oh-my-zsh fork which pays attention to performance).
> I love using zsh (in combination with oh-my-zsh) on OSX but the only thing I've noticed after using it a year is that it's becoming very very slow. As in, it usually takes me 5-10 seconds to login to a new session (locally) and be able to see the prompt and type something.

Clean the history file.

You could put "echo" marks all over your .zshrc file to figure out which parts are taking the longest to execute.
First of all stop using OMZ, it's a massive slow-down. Secondly use the git prompt that comes with git instead, there's no reason to use a custom one.
just use antigen instead of omz - it can use any plugin from omz but seems to be a bit more lightweight