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

Slow fugitive#filereadable #2310

Closed
SolaWing opened this issue Jun 7, 2024 · 1 comment
Closed

Slow fugitive#filereadable #2310

SolaWing opened this issue Jun 7, 2024 · 1 comment

Comments

@SolaWing
Copy link

SolaWing commented Jun 7, 2024

I work on a large repo, and Found that show commit is very slow. I profile vim and found the time cost on git ls-tree, which take several seconds on each call, and is called by fugitive#filereadable, and which is called from other plugin like vim-projectionist, vim-bundler, vim-rails, . following is a profile on show commit from status window:

fugitive-profile.log

As filereadable is a common action to call from anywhere, this problem makes fugitive respond slowly, seriously affecting the user experience.

So my question is: can this performance be optimized to avoid getting the full tree? Or I have to find a way to adjust the caller and not call readable in the fugitive-related buffer?

@tpope
Copy link
Owner

tpope commented Jun 7, 2024

Short answer is you can opt out with:

let g:fugitive_file_api = v:false

This needs to be documented, but doing that means also documenting how this API works. 🥴

So my question is: can this performance be optimized to avoid getting the full tree?

See #1866 and #1868.

@tpope tpope closed this as completed Jun 7, 2024
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

2 participants