c0r73x / neotags.nvim

Tag highlight in neovim
MIT License
122 stars 9 forks source link

Very poor performance when neotags is enabled and the tags file is large #18

Closed haasn closed 6 years ago

haasn commented 6 years ago

I have a project with a large tags file (wc -l tags -> 8949), and enabling neotags absolutely cripples vim's performance. Even simple tasks such as j/k are slow, and saving (:w) takes a good 5-10 seconds. This makes editing any file almost impossible.

Also, even with a smaller tags file (e.g. just 1-2k tags), it's still noticeably choppier when scrolling around or saving files.

Is there a way to speed up neotags? Other highlighting plugins (e.g. TagHighlight) do not have this issue.

c0r73x commented 6 years ago

One way is to disable some of the kind groups, when using a lot of them it can get really slow.

But I've also noticed that it can get slow in some projects for odd reasons. There might be a better way to do the highlighting, The way I do it now is similar to easytags because thats the plugin I used before I wrote this, I will check how TagHighlight does it.

c0r73x commented 6 years ago

I've made some changes that should speed things up a bit. Please try the latest commit.