-
-
Notifications
You must be signed in to change notification settings - Fork 999
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
Status buffer performance for large repo is poor due to untracked file checks #2260
Comments
As a super dirty proof of concept, if I update
with this:
Then the status buffer is essentially instant again |
You can disable the enumeration of untracked files with a Git option:
This will also disable untracked files in a plain Regarding #2207, I need to post a followup there (subscribe to notifications to follow along), but the short answer is I think I'd rather channel that effort into making the |
Thanks for the reply.
I'm actually torn here. Generally, when I'm running git status` manually, I think I'd want to see everything. That would be a much lower-volume and intentionally-initiated workflow compared to the fugitive status buffer reloading, which happens constantly. So I don't love this as a workaround, but I think I can accept it as long as I have a way to do a "full status" reload of the fugitive status buffer. Is there a good way to set config or CLI options for a specific invocation of |
I am not, in principle, opposed to making a Fugitive specific option for this, but I've been hesitant to commit to a convention for repository-specific Fugitive settings.
There's no way to pass options to You could build this out from scratch by invoking |
That's very understandable. I could see using custom git config values (
Totally fair.
This sort of workaround is okay for me, I think. It looks like I should be able to use |
I ended up with the following, which seems to work well:
|
Have you tried |
Yep -- We're already using My understanding is that It's a tragically large repo =( So far I am finding the workaround you suggested to work quite well: the performance of |
I'll start off by saying that I fully acknowledge that the problems I'm about to describe are due to the fact that I'm working with a repo that is far larger than it should be, and doing so on windows to boot. That said, this is the hand I've been dealt and I'd sure like to be able to use fugitive while playing it.
My company has an extremely large repository. To mitigate this, we:
To demonstrate the scale, here is the output of git-sizer run from our most prevalent sparse-checkout setup:
Unfortunately, when working in one of these sparse checkouts, fugitive is essentially unusably slow.
Some quick and dirty measurements:
:G
("cached", meaning the second reload in a row): 8sI suspect that the vast majority of this time is simply identifying untracked files:
Whereas if I omit those:
I tried out the untracked cache, which does help significantly, but
git status
is still spending 3-4 seconds on the untracked files.I understand that in general, we want to be pretty thoughtful about adding new configuration options. That said, I would be surprised if we can solve this for large repositories without disabling some behaviors, which we wouldn't want to force on the 99% of users that don't have such an insanely large repository.
So the low hanging fruit seems like it would be:
fugitive_autoreload_status
setting back? #2207 it sounds like this used to be a thing-uno
when callinggit status
unless some special "full reload" command is givenI am of course open to other suggestions here -- I'm just spitballing based on what little data I have. I'm happy to gather more data if you can give me specific things you want measured and/or better ways of getting real data.
Thanks for all of your hard work on this project and other vim extensions -- you're a legend.
The text was updated successfully, but these errors were encountered: