emacs-devel
[Top][All Lists]
Advanced

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

etags completion table (was: bug#20629: 25.0.50; Regression: TAGS broken


From: Stefan Monnier
Subject: etags completion table (was: bug#20629: 25.0.50; Regression: TAGS broken, can't find anything in C++ files)
Date: Fri, 29 May 2015 17:41:38 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>> Oh, then it's a non-starter (unless the search can be sped up).
> I've posted the numbers along with the two versions of the patch:
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20629#101
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20629#107

Hmm... I missed those, sorry.

I see the first patch says that it takes 1.34s to build the obarray and
0.78s to build an equivalent list of strings, so we could change the
code so as to keep the completion table as a pre-built list of strings
instead of a pre-built obarray.  It will also save us a bit of memory.

As for doing the search each time, the possible gain on the first
completion (0.3s instead of 0.78s) doesn't make up for the loss of going
from 0.02s to 0.3s on subsequent completions.

So that seems like a non-starter, unless we can speed it up
significantly.  It shouldn't be too hard to keep the worst case at
0.76s, but lowering the 0.3s seems harder.  Obviously we could get rid
of the "looking-at" within the loop (fold it into the preceding
re-search-forward), but it seems unlikely that this would gain us much
when there are few matches.


        Stefan



reply via email to

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