-
Notifications
You must be signed in to change notification settings - Fork 197
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
bug: High CPU usage recording macros #864
Comments
I have the same bug, just noticed it last week before updating to 10.2. 100% cpu core usage when recording macro, but using a clean install of nvim it goes down to 5% |
High CPU usage recording macros. issue: folke/which-key.nvim#864
Had a look around in the code today and in the commit 6b023b4, fixing an issue with macros and which-key, it looks like an "infinite recursion", or busy waiting loop calling which-key.nvim/lua/which-key/triggers.lua Lines 139 to 149 in 6b023b4
Maybe I understand the code wrong and I am not sure if that was intended, or if there is a better way, but it would explain the CPU usage. |
According to LazyVim/LazyVim#4553 folke is on vacation until the end of the month 🌴 |
High CPU usage recording macros. issue: folke/which-key.nvim#864
But seriously, is this But then again I don't know the codebase at all, so I am not sure what purpose that line serves. |
Awesome, thank you! 🚀 |
🤖 I have created a release *beep* *boop* --- ## [3.14.0](v3.13.3...v3.14.0) (2024-11-28) ### Features * **icons:** add grapple icon ([#838](#838)) ([c21b71f](c21b71f)) ### Bug Fixes * **state:** use redraw flush to prevent issues with selecting visual line etc. Fixes [#898](#898) ([3974c2d](3974c2d)) * **triggers:** when in macro defer re-checking suspended for 100ms. Fixes [#864](#864) ([f46556b](f46556b)) ### Performance Improvements * **state:** only redraw when waiting for a key longer than 200ms ([1c5aeba](1c5aeba)) * **tree:** small perf optims ([5610eb6](5610eb6)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Did you check docs and existing issues?
Neovim version (nvim -v)
0.10.2
Operating system/version
Ubuntu 22.04.
Describe the bug
By accident I left a neovim instance open where there was a macro recording session still running (classic
qq
I guess). I noticed the CPU fan was spinning and then checked top confirming thatnvim --embed
was running at 100% CPU. Hittingq
to stop the recording got the CPU usage back to normal.Bisecting my neovim config I found out that this issue only occurs with the which-key plugin loaded.
Seeing that there was some work done in that are, e.g. #851, maybe there are some issues left there?
Steps To Reproduce
nvim foo.txt
qq
q
Expected Behavior
Regular CPU usage
Health
No response
Log
No response
Repro
No response
The text was updated successfully, but these errors were encountered: