RRethy / vim-illuminate

illuminate.vim - (Neo)Vim plugin for automatically highlighting other uses of the word under the cursor using either LSP, Tree-sitter, or regex matching.
2.18k stars 50 forks source link

neovim high cpu usage in a large c files #131

Closed menash134 closed 2 years ago

menash134 commented 2 years ago

Neovim version (nvim -v) v0.8.0-dev-1117-g7bd4c8e8e

Operating system/version Linux HPZ2-Siemens 5.15.0-46-generic 20.04.1-Ubuntu SMP Thu Aug 4 19:15:44 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Terminal name/version tmux

$TERM environment variable tmux-256color

Installation appimage

How to reproduce the issue nvim_prof.log

nvim opening a c file with 13801 lines. go to insert mode and edit the file and then see the htop. now cpu usage of nvim is 100% and it freezes to edit for sometime and recovers.

I profiled the problem in insert mode and attached. my neovim config is in https://github.com/menash134/nvim.git

I commented out your plugin Illuminate and then cpu usage is okay and the insert operation does not freeze

nvim_prof.log

Expected behavior zero performance problems in editing large files

Actual behavior multiple freezes before adding a single letter in the file.

RRethy commented 2 years ago

Please follow the issue template when filing an issue, e.g. there is no minimal config nor a sample file.

From the template:

**Note** Omitting a minimal init.vim/init.lua/.vimrc will likely result in the issue being closed without explanation.