-
Notifications
You must be signed in to change notification settings - Fork 947
vcs prompt element causing extreme slowness/hanging #323
Comments
Hi @briantully - We made some significant speed improvements to the |
Hi there Ben! When debugging this morning I actually pulled in the latest from master when I saw the commit message about speeding up vcs. I was hoping it would be the fix, but unfortunately it didn't have any effect -- my prompt would still hang for 5-10 seconds when in a directory with a git project. Are there any config elements to simplify/disable some of the vcs functions that may be time intensive? Sent from my iPhone
|
Whoa, the latest commit is that slow for you? That's really strange. You're the first to report slowness with the latest tag. If you checkout the v0.3.1 tag, do you see the same issue? |
So I dig into the theme and vcs.zsh functions and saw that there was this option POWERLEVEL9K_VCS_GIT_HOOKS=(vcs-detect-changes git-untracked git-aheadbehind git-stash git-remotebranch git-tagname) One at a time I disabled/enabled each of the hooks/functions, and for me it seems the git-stash hook is what is causing the hang/slowdown. I was able to work around it by disabling it in my .zshrc, e.g.: POWERLEVEL9K_VCS_GIT_HOOKS=(vcs-detect-changes git-untracked git-aheadbehind git-remotebranch git-tagname) All is well in my terminal with git-stash hook disabled :) |
Indeed, it is Note that I am running the latest version of git (2.10.1) from Homebrew, and I think this is where the issue exists. When I use OS X default git (2.7.4) So it appears to be an issue with git 2.10.1 :) |
I use powerlevel9k with prezto and it's really slow for large git repositories. I tried to remove git-stash, but it is still slow. The sorin and the pure prompt are pretty much instant. I changed to pure for now as speed is more important than the extra info. |
@briantully How many stashes do you have? Are we talking about just a few, or hundreds? And could you do an @Herjar Do you have a lot of untracked files? This is one of the causes of a slow experience. The reason behind this is that for displaying the |
I only had 1 stash for the repo I was working on. I generally only have a few in most cases. Even with the 1 stash, git 2.10.1 was taking upwards of 5 seconds. I deleted 2.10.1 and reinstalled 2.9.3 and 'git stash list' is once again almost instantaneous. Sent from my iPhone
|
@dritter No I don't think so. As an example just try to clone VSCode (https://github.com/microsoft/vscode). Doing anything in that directory is slow for me with powerlevel9k and instant with pure. Just doing 'ls' I get the results immediatly, but have to wait 1-2sec for the prompt to show up again. If there is no problem for you maybe it's something with my setup. |
@Herjar Hmm. It is not super fast, but ok. We issue |
@briantully, @Herjar, @dritter - Thanks for looking into this! Okay, so it sounds like As @dritter mentioned, the Pure theme uses Closing this bug. @briantully's original problem was tracked to |
Just this week started noticing that my terminal was slowing to a crawl and hanging whenever I was in a git project directory. Literally would take seconds before I was able to do anything in the terminal (iTerm2). After hours of debugging iTerm, my .zshrc file, etc, I switched to several other themes and noticed my terminal acted normally again. I then removed the vcs from my prompt in the powerlevel9k config elements, and now the theme is back to speedy normal. When I add back the vcs prompt, it slows to a crawl.
I'm not sure what was updated recently that would cause this sudden degradation. If I recall oh-my-zsh may have auto-updated last week. I'm running El Capitan 10.11.6 / git 2.10.1 (installed via Homebrew).
powerlevel9k is my favorite theme so I'm hoping I can use it again. Anyone else having this issue with vcs prompt functionality?
Is there a way to use vcs and disable some of the more time consuming/blocking functions?
The text was updated successfully, but these errors were encountered: