Stahlman Family wrote:
Recently, I've begun building tags for a very large development project.
The time required by Vim to build the list prior to displaying the first
match after I hit wildchar for a :tag command has become noticeably
long. I researched it a bit in both the help and the source code, and
I'm wondering why Vim always does a linear search for tag completions
that could return more than one match. I mean, I understand why in a
case like this
:ta /[a-z]_fun<wildchar>
linear search would be necessary. But what about in the much more common
case
:ta ProcessA<wildchar>
For such fixed start patterns, all possible matches will be clustered
together (and usually will span no more than a handful of lines) in a
sorted tags file. Thus, the beginning of the range of possibilities
could be found via binary search, then the remaining matches could be
found by traversing the tags file linearly until the last match is
found. For tags files containing tens of thousands of tags, as mine
does, this would result in a dramatic improvement in responsiveness when
wildchar is hit.
Thanks,
Brett Stahlman
Does your tags file start with one of the lines
!_TAG_FILE_SORTED<Tab>1<Tab>{anything}
or
!_TAG_FILE_SORTED<Tab>2<Tab>{anything}
and if yes, which one? And what is the reply to ":verbose set ignorecase"?
see ":help tagsrch.txt" then search for /!_TAG_
Best regards,
Tony.