Closed nvincent-vossloh closed 3 months ago
The current implementation of :Tags
can never be as fast as tjump
.
tjump
knows that the tags file is sorted by the symbols, so it can quickly binary-search for the specified symbol. The size of the tags
file doesn't matter much.
On the other hand, :Tags
reads through the whole tags
file and loads everything on memory so that fzf can interactively search for any string on the line, not just the symbols. It will not work well with large tags files.
One thing we can try is to use readtags
to pre-filter the list and feed the only matching lines to fzf on :Tags PREFIX
.
readtags -t tags -p - prefix | fzf --query prefix --select-1
man fzf
)Hello,
Thanks for your beautiful tools :slightly_smiling_face:
I have some repositories with larges tags file (130MB, few gigabytes) and when I use the
Tags
command to jump to the definition of a function, it takes a few seconds to process (up to 15 seconds on the linux sources ).I had a quick look at the
fzf#vim#tags
function, and it looks like calling thetags.pl
script takes quite some time (on large tags file). I replaced thetags.pl
with the following:(tested only with a single tags file located at the root of my sources folder from where I open vim). It is better, but still takes some time (compared to native
tjump
). Then I tried to modifyfzf#vim#tags
to usecat
ands:tags_sink
to make up for it, it still takes 7-8 seconds to load something, whiletjump
is instantaneous (tags file size is 1.2GB)I have reproduced the behavior with minimal vim configuration.
Do you have any idea on how to improve response time of tags search ?