chrisbra / Colorizer

color hex codes and color names
549 stars 31 forks source link

Performance drops after activating and doesn't clear up on ColorClear #84

Open levihb opened 4 years ago

levihb commented 4 years ago

So when I activate it I get a large performance drop, as might be expected from how vim works and how this plugin works. Which is fine. But the problem is that it will never recover unless I close/reload the buffer or restart vim.

I've tried it through both ColorToggle and ColorClear, but despite the fact that the highlighting has gone the performance does not recover.

I'm running neovim v0.4.4 and the latest version of the plugin.

TerryChau commented 2 years ago

This might affect your experience, but have you tried turning off all autocmd's or each autocmd one by one to see if you have the same issue.

        let g:colorizer_textchangedi = 0
        let g:colorizer_insertleave = 0
        let g:colorizer_cursormovedi = 0
        let g:colorizer_cursormoved = 0
        let g:colorizer_bufwinenter= 0
        let g:colorizer_winenter = 0
        let g:colorizer_bufleave = 0
        let g:colorizer_guienter = 0
        let g:colorizer_colorscheme = 0

Autocmd calls to textchangedi or colorizer_cursormovedi can be very processor intensive, and can interfere with other plugins.