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

Git plugin lags bash prompt for large repositories. #6

Open
CourteousCoder opened this issue Mar 13, 2018 · 3 comments
Open

Git plugin lags bash prompt for large repositories. #6

CourteousCoder opened this issue Mar 13, 2018 · 3 comments
Assignees
Labels
bug-report Issues about bug reporting help-wanted Issues that require help from third party P2 - Important Priority 2 performance-issue

Comments

@CourteousCoder
Copy link

This problem is identical to a problem in oh-my-zsh, which has a few proposed solutions.

Synopsis

When the current working directory is in a large git repository, the bash prompt takes around 5 seconds (in my case) to load.

Steps to reproduce

  1. Run git clone on a large repository.
  2. Run cd into that repository.
  3. Wait several seconds.
  4. Run any command.
  5. Wait several seconds.
  6. See a bash prompt
  7. Repeat steps 4, 5, and 6, any number of times.

Remarks

This problem occurs in both Ubuntu and Cygwin.

In oh-my-zsh, but not oh-my-bash, I was able to speed it up by doing the following:

  1. Run cd into the large repository.
  2. Run git config --edit
  3. Add the following lines and save.
[oh-my-zsh]
        hide-status = 1
        hide-dirty = 1

I think it's an elegant solution because it is on a per-repository basis; however, this does not work oh-my-bash, not even if I change [oh-my-zsh] to [oh-my-bash].

@nntoan nntoan added bug-report Issues about bug reporting help-wanted Issues that require help from third party up for grabs labels Jul 26, 2018
@sanfusu
Copy link

sanfusu commented Nov 24, 2018

You can Run git config --edit and add the following lines and save

[bash-it]
    hide-status = 1

This config works for the most theme!

@Kreyren Kreyren added P3 - Normal Priority 3 - Normal P2 - Important Priority 2 and removed up for grabs P3 - Normal Priority 3 - Normal labels Aug 15, 2019
@Kreyren Kreyren self-assigned this Aug 20, 2019
@Kreyren
Copy link
Contributor

Kreyren commented Aug 20, 2019

Any suggestion to fix this? Should we make a logic to add suggestion by @sanfusu ?

@nntoan
Copy link
Member

nntoan commented Oct 23, 2020

I'm looking into this, can you guys give me an example for a large repository?

Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Issues about bug reporting help-wanted Issues that require help from third party P2 - Important Priority 2 performance-issue
Projects
None yet
Development

No branches or pull requests

5 participants