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 branch slow on windows - nvim #26

Closed
vonPB opened this issue May 11, 2022 · 7 comments
Closed

Git branch slow on windows - nvim #26

vonPB opened this issue May 11, 2022 · 7 comments

Comments

@vonPB
Copy link

vonPB commented May 11, 2022

Hi,

I've noticed that the systemlist() call in line 110 of 6d2138e drastically slowed down my nvim; pretty much slow motion.

bug.mp4

It's more an issue of neovim/windows than with this repo, so feel free to close.
The plugins works just fine on Arch :)

If anyone has a quick fix/idea other than disabling the branch function, I'd appreciate it.

@johan-bjareholt
Copy link
Member

I think this is important, syncronous commands can be quite slow. aw-watcher-vim already did shell commands prior to this change, but they did so asyncronously, so it did not have an impact on responsiveness. There is nothing more annoying than an unresponsive editor!

I think that the branch detection should be made asyncronous as well. It's also a bit excessive to check git branch on pretty much every time you move the cursor.

@vonPB
Copy link
Author

vonPB commented May 12, 2022

Totally agree with you @johan-bjareholt. It would be sufficient to get the branch on buffer change for instance and save it as a global variable instead.

@johan-bjareholt
Copy link
Member

Maybe just checking every 10-60seconds (possibly configurable) and do it asynchronously would probably be good. Should be a bit more reliable than a buffer change.

@FilipHarald
Copy link
Contributor

Ah, my bad. I can look into it this weekend. But I can't promise I'll solve it :)

@infokiller
Copy link

infokiller commented May 15, 2022

I can confirm this makes editing in vim totally unusable.
@johan-bjareholt @FilipHarald I think this change should be reverted until there's a more efficient async implementation working.

@ErikBjare
Copy link
Member

@infokiller I agree, it was my bad to merge too eagerly. Reverted now, see #25 (comment)

@infokiller
Copy link

Thanks @ErikBjare for the quick fix!

@ErikBjare ErikBjare changed the title Git branch slow on windows - nvim [not important] Git branch slow on windows - nvim May 15, 2022
@vonPB vonPB closed this as completed Jul 6, 2022
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

5 participants