Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Really slow #22

Closed
simkessy opened this issue Jul 1, 2015 · 5 comments
Closed

Really slow #22

simkessy opened this issue Jul 1, 2015 · 5 comments

Comments

@simkessy
Copy link

simkessy commented Jul 1, 2015

Hey,

I just implemented this in a vagrant box and it works perfectly but it's really slow. I even removed the git_dirty from PS1 but that didn't improve things much.

This is what my prompt looks like:

export PS1="\${debian_chroot:+(\$debian_chroot)}\[$txtgrn\]@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] \[$txtylw\]\$git_branch\[$txtrst\]\$ "

@michaelachrisco
Copy link

Is git status also slow? I had this same issue when running the script as .bashrc.
What does:
time git rev-parse --abbrev-ref HEAD
and
time git status --porcelain
look like @simkessy?

In my case, I had to do a git --prune on my repo (forgot to exclude some log files).

@joeytwiddle
Copy link

joeytwiddle commented Sep 24, 2015

If you are suffering from a slow prompt, you might like to try my fork. If the git status process takes too long, then it aborts to give you a prompt, but continues processing in the background, so you can get the stats later. It's probably not for everyone, but maybe it can help you.

@michaelachrisco
Copy link

Interesting, Ill have to give your fork a try. I like the fact that it starts the git status --porcelain in the background. 👍 but not sure if its actually faster.

@joeytwiddle
Copy link

This issue seems like a duplicate of #9

@jimeh
Copy link
Owner

jimeh commented Oct 16, 2015

This does in indeed look like a duplicate of #9.

@jimeh jimeh closed this as completed Oct 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants