From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Scott Frazer Newsgroups: gmane.emacs.help Subject: Re: How to use etags-select Date: Tue, 04 Sep 2007 09:31:25 -0400 Organization: Ye 'Ol Disorganized NNTPCache groupie Message-ID: <1188912686.245407@sj-nntpcache-2.cisco.com> References: <1185011823.491178.262070@d55g2000hsg.googlegroups.com> <1185197038.360649@sj-nntpcache-3.cisco.com> <1185265027.418651.315530@m3g2000hsh.googlegroups.com> <1185296113.195452@sj-nntpcache-3.cisco.com> <1185550332.397562.17110@b79g2000hse.googlegroups.com> <1185561317.788809@sj-nntpcache-2.cisco.com> <1188648321.765941.18960@y42g2000hsy.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1188913316 18987 80.91.229.12 (4 Sep 2007 13:41:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 4 Sep 2007 13:41:56 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 04 15:41:56 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1ISYez-0000iq-FE for geh-help-gnu-emacs@m.gmane.org; Tue, 04 Sep 2007 15:41:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ISYey-0004xZ-1m for geh-help-gnu-emacs@m.gmane.org; Tue, 04 Sep 2007 09:41:40 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!hwmnpeer01.lga!news.highwinds-media.com!hw-filter.phx!newsfe12.phx.POSTED!53ab2750!not-for-mail User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) Original-Newsgroups: gnu.emacs.help In-Reply-To: <1188648321.765941.18960@y42g2000hsy.googlegroups.com> Cache-Post-Path: sj-nntpcache-2.cisco.com!unknown@scfrazer-wxp.cisco.com X-Cache: nntpcache 3.0.2 (see http://www.nntpcache.com/) Original-Lines: 45 Original-NNTP-Posting-Host: 171.70.140.15 Original-X-Complaints-To: newsadmin@cisco.com Original-X-Trace: newsfe12.phx 1188912686 171.70.140.15 (Tue, 04 Sep 2007 06:31:26 MST) Original-NNTP-Posting-Date: Tue, 04 Sep 2007 06:31:26 MST Original-Xref: shelby.stanford.edu gnu.emacs.help:151672 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:47197 Archived-At: 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