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

zsh-git-prompt blocks access to the repo until loaded #11

Open
tomsquest opened this issue Jun 1, 2012 · 6 comments
Open

zsh-git-prompt blocks access to the repo until loaded #11

tomsquest opened this issue Jun 1, 2012 · 6 comments

Comments

@tomsquest
Copy link

My concern is about the speed to display the prompt.

I have a big git repo here, but not huge : ~45,000 files.
When accessing for the first time the repo ('cd' into it), my SSD disk "spins" for nearly ~15sec, and then, display the prompt.

I don't have any problems with smaller repo.

So, is there a way to make the Git prompt's computation not blocking ?

@olivierverdier
Copy link
Owner

So, is there a way to make the Git prompt's computation not blocking ?

Good point, I really don't know if that's even possible.

If you have any pointers on how to implement that, I'd be happy to give it a try.

@huyz
Copy link

huyz commented Dec 9, 2012

I'm concerned about speed as well.

I wouldn't mind upon the first time we cd into the repo, if ZGP knows it will take a while, it can do the initial work in the background and let zsh immediately show the prompt with minimal fast information, e.g. the branch name. (and an indicator of incomplete information such as"...")

On subsequent prompts, once all the info is in, the prompt could display the full info.

@olivierverdier
Copy link
Owner

The last version has improved speed capabilities, especially due to 5c06cf3. It's reasonably fast even on pretty big repos.

@rnc
Copy link
Contributor

rnc commented Sep 3, 2014

As a slight aside - it is possible in ZSH to get the prompt to update in the background. On zsh-users Bart Schaefer suggested a method ( https://www.zsh.org/mla/users/2014/msg00448.html ) e.g. https://github.com/rnc/nicks-shell/blob/master/.zshrc#L186

@olivierverdier
Copy link
Owner

Interesting! Thanks!

@olivierverdier olivierverdier reopened this Sep 3, 2014
@rnc
Copy link
Contributor

rnc commented Sep 3, 2014

One warning though - this requires a modern version of ZSH (e.g. 5.0.5) and on top of that there is a nasty 100% CPU issue that was fixed in 5.0.6 (or in 5.0.5 in Fedora) - see the comments in https://www.zsh.org/mla/users/2014/msg00688.html and references https://github.com/rnc/nicks-shell/blob/master/.zshrc#L177

asilata pushed a commit to asilata/zsh-git-prompt that referenced this issue Jul 25, 2018
- Overhaul of tests. Clearly separate functional and integration tests.
- git_paths now resolves possible merge_file and rebase_dir, not
guaranteed to exist.
- Update README to show all possible branch states, including merging and
rebase now added.
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