OS X 10.11 (El Capitan) Making Zsh Very Slow

Solution 1:

You have to install or update Command Line Tool of XCode.

  1. Start XCode.
  2. Go to XCode/Preferences.
  3. Click the "Downloads" tab.
  4. Click "Components".
  5. Click "Install" on the command line tools line.

Solution 2:

It turned out to be an issue with oh-my-zsh plugins listed in my .zshrc

Since I had a fresh install and copied my dotfiles immediately to the system some of the plugins i have listed in my .zshrc such as ruby's rvm and pyton's virtual env were not yet installed. This caused zsh to recursively keep looking in my $PATH folders for these tools and cause this annoying delay issue in my terminal

I removed these plugins from .zshrc before installing these command-line tools first. After installing everything I listed the plugins back, and now everything works fine.

Hope this help others facing the same problem.

Solution 3:

My zsh using zgen and oh-my-zsh was also running slow after a fresh install of El Capitan.

Narrowing it down, it turned out to be my theme's (S1cK94 minimal) git support that didn't play well with the OS-provided git. After installing the latest git version via Homebrew, zsh is up to speed again.