Wednesday, February 4, 2015

Re: taglist() performance

This is an old thread, but I wanted to provide some evidence in support of
Hari's post.


Hari Krishna Dara wrote
> I am finding that the new taglist() function performans much slower than
> the :tag command for the same pattern. I have a couple of huge tag
> files in 'tags' and doing something like:
>
> :ta /.*t
> <Tab>
> will start giving me the matches with in a second or two (at the most),
> but calling taglist('t') will take a long time (didn't finish after
> waiting for a couple of minutes). I would imagine both :tag command and
> taglist() using the same tag lookup code, so probably it is the
> generation of list of dictionary entries that is very inefficient.

I have a tags file generated with Exuberant Ctags that contains 266,677 tags
and several extra fields (--fields=ilmS).

Using taglist() to scan the tags takes several hours. I then re-wrote my
script to scan the file with readfile(), and wrote my own parse routine to
create the same dictionary that taglist() creates. The rest of my code was
basically the same. The new version takes several seconds! I'm running
this on a Macbook Pro (late 2011).

I have working code with and without taglist() if anyone want's to try.
The function uses the ctags "inherits" field to find all classes that
inherit from a given base class. I can send the files to you, or you can
get it at
http://stackoverflow.com/questions/25655673/c-cscope-ctags-and-vim-finding-classes-that-inherit-from-this-one/28311893#28311893.
The old code that uses taglist() can be found by browsing the edit history.



--
View this message in context: http://vim.1045645.n5.nabble.com/taglist-performance-tp1149739p5723924.html
Sent from the Vim - General mailing list archive at Nabble.com.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment