I'm using macOS 10.15.2 with iTerm2, zsh 5.7.1 and oh-my-zsh (theme robbyrussell).
I noticed that the prompt print is slightly slow respect to the bash one. For example, if I press enter, cursor initially goes at the beginning of the next line then, after a little while, the shell prompt comes in and the cursor is moved to its natural position. For example, if → ~ is the prompt when I'm in my home folder, and [] is my cursor, when I press enter I see:
0 - Idle status
→ ~ []
1 - Immediately after pressing enter
[]
2 - Back to idle status
→ ~ []
This slowness is particularly evident when I quickly press enter multiple times. In this case, I see some blank lines. This is what I see
→ ~ → ~ → ~ → ~ → ~ → ~ → ~ → ~ → ~ [] I come from bash shell and when I use bash, there is not such a slowness. I'm not sure this is an issue of oh-my-zsh or its natural behavior. I'd like to know more about this and, eventually, how to fix it. Thanks.
PS: the problem comes from oh-my-zsh and it persists even if I disable all the plugins.
PPS: I previously posted this question on SO. Thanks to user1934428 for his help and for suggesting me to move this question here.
zsh-- i.e., after removing the config folder ~/.oh-my-zsh and reinstalling with the script on GitHub -- I noticed that the lag time was lower. It quickly increased to around 0.5 seconds per command with some time.