3

I am quite familiar with bash, but I would like to give a try to zsh. Lot of people told me to try oh-my-zsh.

After the installation I get a unreadable prompt and when I eventually find an acceptable prompt it is just very slow. It takes about 300..1000ms for the prompt to display its content. How can I make it faster and how oh-my-zsh users can deal with that?

I've tried it on several platforms (Cygwin, VirtualBox Ubuntu, Debian) and each time I get this very slow behavior.

Can I get rid of it? Is it worth to use zsh despite its speed?

  • Is zsh only slow when you have the oh-my-zsh enabled? Have you tried zsh all by itself? I don't am not a zsh fan, but have used systems with it as the default shell, and it never seemed significantly slower than bash. I would bet you have some plugin that is doing something that is computationally expensive, or perhaps access the Internet. – Zoredache Nov 25 '15 at 23:53
  • 2
    Because git (vcs_info) is slow, and many prompts query git status synchronously. Get an async prompt, e.g., pure: github.com/sindresorhus/pure. – 4ae1e1 Nov 30 '15 at 23:19
3

@4ae1e1's comment above should be an answer.

  1. Try to see performance if you type prompt off. This is ugly but if this improves the performance, you know that the prompt is to blame. (Read on...)
  2. Some prompts are orders of magnitude faster under certain conditions. For me this is the case when I am not connected to the corporate network, and some 'mount' options make the filesystem really slow. In this case, prompt off will be fast.
  3. prompt -c will show the current prompt.
  4. prompt pure will select 'pure' as the prompt engine. This uses asynchronous calls and is significantly faster than prompt powerline or others.
| improve this answer | |
  • 1
    The problem is more all the processes ran in background. Running a process and discovering the fs in Cygwin is horribly slow. I don't think there is a solution to this issue other than WSL. – nowox Jul 30 '17 at 10:22
  • 1
    What is the prompt command, my fresh cygwin install + zsh + oh-my-zsh, doesn't have it? – Morgoth Oct 5 '18 at 7:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.