-
Notifications
You must be signed in to change notification settings - Fork 49
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
vimagit can be very slow #170
Comments
Thanks for your report, this is a lead I never explored. |
Maybe it has also to do with certain filetypes, because usually it's fast. It behaved worst with dos files with very long lines and lots of tabs (a sort of table). |
As you mention very long lines, it reminds me that vim by itself can be very slow with long lines, because of syntax coloring. |
By any chance, would you have a public repository which makes vimagit slow? Could you also test with this following setting in your vimrc: |
You could try with this commit, make a branch out of it, then The README.md file takes a lot to be staged/unstaged, but hit Edit: |
Excellent, thanks a lot for your input! |
On first refresh, vimagit can be stuck during several seconds. foldmethod=syntax seems to be the culprit. Longer explanation: Remove folding while we are updating the buffer. writing to the buffer while the folding is enabled can be veryyyyy slow. One last strange thing is that, the first time the buffer is written, it is not slow at all. It is slow the second time, at first refresh (can be order of seconds). Then at third time (2nd refresh), it is fast again.
Hourray! It has been fixed! Thanks a lot for all your input, it wouldn't have been possible without that. Could you try the branch next? |
Thanks, I'll be able to test it in a few days because I have only Windows in this machine and gvim there doesn't seem to have this problem (even if it's slow on its own because command line stuff seems to much slower on Windows anyway), but I'm confident it will work :) |
Ok I tested it and it seems perfect to me, much more responsive, thanks! |
Short description of the problem
vimagit buffer update can take ages. It usually happens when there are a lot of changes. My guess is that it has to do with folding, because if I abort with
<C-c>
while the process is stuck, close the buffer and reopen vimagit, hunks are staged/unstaged correctly. Maybe vimagit updates the buffer while folding is active, bit by bit? In this case a possible solution would be to disable folding while updating buffer, or similar.Steps to reproduce
The more text, the slower it is. It's not dependent on the number of hunks, but on how big hunks are.
Environment
Linux Debian stable.
vim
ornvim
version: vim 8.0+ (sometimes 8.1)git
version: 2.11current vimagit version or (or SHA1): 85c25ff
terminal or gvim: terminal
The text was updated successfully, but these errors were encountered: