-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
fix high cpu #121
fix high cpu #121
Conversation
for some users, they may like using cursormoved to get an immediate response, we can implement one debounce function |
I decided to implement additional debounce functionality, although CursorHold is enough for me |
fix typo fix typo fix
This pr add three config options:
|
Hi! Thanks for the PR! I'll check it in the near future! |
Oh, I didn't notice this before |
Now, I think every thing is ok, current code only enhances the original functions, adds event configurations for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! I left a few comments mostly on pull request polishing.
Co-authored-by: Sam Bossley <sam@bossley.xyz>
Other than that, I'm ok with this as long as @f-person is ok with it! 🚀 |
Co-authored-by: Sam Bossley <sam@bossley.xyz>
ok, thx |
@f-person have you had any time to take a look at this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you, this is really great! i approve this pr, but left a comment; let's discuss that matter a bit further and maybe merge it or decide to do something else. looking forward from hearing back from you! thanks! <3
I linked the issues you mentioned since it is very likely this PR will fix them. The best way to test a big repository is to clone https://github.com/nixos/nixpkgs and try to open |
I tried it(nixpkgs |
By the way, it is recommended to close all treesitter related plugins during testing, including itself, because the performance of treesitter is really poor. |
Okay, let's merge this! Thank you very much for the effort on this, @jinzhongjia & @bossley9!! <3 |
Maybe clearing the existing message should be done immediately on cursor move and not whenever we set the next one? |
I think that's ok, let me create a new pr |
The PR #121 introduced some side-effects which made the plugin feel more laggy overall because of how the virtual text got cleared with a delay. This commit retains the original delay behavior for displaying, while immediately clearing the virtual text on cursor move.
The PR #121 introduced some side-effects which made the plugin feel more laggy overall because of how the virtual text got cleared with a delay. This commit retains the original delay behavior for displaying, while immediately clearing the virtual text on cursor move.
Recently, my main development environment was changed to windows. I found that the event used by git-blame is cursormoved, and this event is triggered very frequently.
Git itself on windows runs slower, which causes the entire neovim to be blocked
I replaced cursormoved with cursorhold