Open fniessen opened 6 years ago
I'm not sure about the context of this old issue, but I also had some problems with ZSH being extremely slow (minutes per line). I traced this back to agnoster's prompt_git
function taking an extremely long time to return. I was working on a remote file system in a large dirty git repo, and running git status
(part of parse_git_dirty
) was excruciatingly slow.
The easy work around is to hide git from the prompt for slow repos. Unfortunately this needs to be done for each repo individually and requires write access.
git config --bool --add oh-my-zsh.hide-status 1
A better solution would be to implement asynchronous prompt updates ala pure.
I must admit that, because of the slowness, I've changed my environment, and have migrated to Zinc. Works quite well!
If you've got some time to spare and are curious, try my "Agnoster-J" fork: https://github.com/apjanke/agnosterj-zsh-theme. It has some feature and performance enhancements, and I take "this is slow" as a valid bug report.
@apjanke Thanks! I even put some work towards your version of this bug, apjanke/agnosterj-zsh-theme#6
I switched to powerlevel10k in OhMyZsh for iTerm2. It has everything agnoster has and much more, and it's just as fast as my barebones Mac Terminal. I spent three days trying to make agnoster fast, but it just wouldn't catch up.
Dear Isaac, yes, as you stay, it's very slow. But so useful everybody lives with it, I think. So useful to my everyday work habits.
Now, regarding that problem, you could have a look at the plugins/gitfast/git-prompt.sh implementation. They do present the same set of info (even a little bit more, like the differences with the upstream), and that seems to be quite fast…
Just a hint.