help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use etags-select


From: Scott Frazer
Subject: Re: How to use etags-select
Date: Tue, 04 Sep 2007 09:31:25 -0400
User-agent: Thunderbird 2.0.0.6 (Windows/20070728)

Rafal Kurcz wrote:

Great thanks for help Scott.
Sorry for bothering you again but I think I found another weak point
of etags-select.
I started using it with the linux kernel's latest source tree.
I generated the TAGS file:
exuberant-ctags -R -e

The size of TAGS file is 54 MB.

Locating the tag with:
etags-select-find-tag-at-point

takes about 10s on Pentium 4 2.4 GHz.
It takes about 15s when loading the TAGS table for the first time.

Using the M-. takes about 0.5 s that is quite acceptable

I did the test with Vim.
I generated the tags table with:
exuberant-ctags -R

The size of tags file is 74 MB (37% larger than emacs TAGS table).
Vim is extremely fast when locating all the tags and showing the
choice list.
It takes much less than 0.5s.

Do you have any idea why etags-select works so slowly ?


The difference between etags-select-find-tag-at-point and M-. is most likely 
that
M-. stops at the first occurrence of a tag, but etags-select-find-tag-at-point
has to go through the entire TAGS file to find all occurrences.  54 MB is quite 
a
bit.  I'm curious though: is there a tag waaaay at the end (and only there) of
TAGS that you could try searching for using M-. and tell me if it's still fast?
I tried to be very careful with my search regexp, but maybe there's a sneaky
efficient way.

As for Vim: (1) Maybe the search is written in C or something (somewhat 
unlikely),
(2) There is only a single tag format for Vim, vs. three for Emacs thus tripling
the things that have to be looked for (more likely), and (3) Vim tag files are
sorted so you can have a much more efficient search algorithm (big honkin' 
likely).

Scott


reply via email to

[Prev in Thread] Current Thread [Next in Thread]