Closed idoa01 closed 6 years ago
Thanks, you are right; there does seem to be a large difference in CPU usage between ignorecase
and noignorecase
. Apparently, when ignorecase
is toggled (internal to the plugin) vim redraws the screen, which happens to be slower for large ruby files.
I think I can fix this.. but in any case, have you tried the deferred matching?
let g:matchup_matchparen_deferred = 1
" let g:matchup_matchparen_deferred_show_delay = 50 {may configure milliseconds}
tried it now, display is still choppy and CPU is high
Could you try the most recent version? For me this brings the CPU down a lot.
looks a lot better, thanks!
excellent, closing then.
Explain the issue
when using
vim-matchup
andignorecase
andhlsearch
set in the.vimrc
(both must be set), I see high cpu usage (up to 100% cpu) when editing a ruby file (see attached example file) (might also happen in other formats, didn't check, but didn't happen in a small vimscript file)vim version:
steps to reproduce. using the attached minimal .vimrc and the attached test.rb, use keyboard to run up and down the file and see the CPU skyrocket.
Expected behavior smooth cursor behavior and low CPU usage.
Observed behavior choppy cursor, high CPU
Minimal working example
(Tried to cut more of the code, but it seems that the length of the code is a factor in the CPU usage)
Minimal vimrc file
Please provide a minimal vimrc file that reproduces the issue. The following should often suffice: