I have a big source code base on both Mac and Windows on which I work on this with MacVim/NeoVim.
When using CTRL-]
to search tag through a 1.6G tags file,
I got immediate result with MacVim while surfering about 5s to get search result from NeoVim.
- How to profile this action
CTRL-]
? Vim profile seems need to call a function likeprofile func *
, however I don't know the underneath callee functionname. - Is there like a
exe
application called by actionCTRL-]
, which causing such bad performance.
Any ideas to this problem?
NeoVim version is v0.4.3 MacVim version is 8.2 MacVim and NeoVim share the same vimrc. Source code base on both windows and mac are placed on SSD.
Finally I solved my problem by reducing (1.6GB->0.6GM) the size of the tags file which is thought to be the main cause. If your encountered similar problems as mine. You may fellow steps as below.
- make sure virus scanner is innocent
- check your vimrc, make sure
tagbsearch
andtagcase
config are correct for binary tag searching. - make sure only the information that you concerned remain in your tags file. try to use
ctags.exe
with--exclude={regex you want to ignore}
or--languages={languages you want to ignore}
to reduce the size of tags on windows. (wildcard*
is only available when you see+wildcards
inctags.exe --version
)
After all, NeoVim or gVim on windows seem have a lower threshold for the size of tags file than MacVim. When the threshold is bypassed, CTRL-]
will become slow apparently.