From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Bonow Newsgroups: gmane.emacs.help Subject: Re: OT:cscope/tags Date: Mon, 04 Dec 2006 21:37:56 +0100 Message-ID: <87vekrqtwb.fsf@post.rwth-aachen.de> References: <03veksq9rj.fsf@gmail.com> <874pscrlkh.fsf@post.rwth-aachen.de> <87zma3rabc.fsf@post.rwth-aachen.de> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1165264930 5914 80.91.229.10 (4 Dec 2006 20:42:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 4 Dec 2006 20:42:10 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 04 21:42:06 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GrKdT-0001eg-Lw for geh-help-gnu-emacs@m.gmane.org; Mon, 04 Dec 2006 21:41:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GrKdT-0002mO-IP for geh-help-gnu-emacs@m.gmane.org; Mon, 04 Dec 2006 15:41:59 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!news.dfncis.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 55 Original-X-Trace: news.dfncis.de WwX65hX7K0ZWWpZWnaYiTACQeJ+2b1ktDHbaAn/y5ClABhMQsXAgIqIJL3 User-Agent: Gnus/5.110006 (No Gnus v0.6) XEmacs/21.4.19 (linux) Cancel-Lock: sha1:ySyiOZolJBn6I4Ux5gFzBRGD7OQ= Original-Xref: shelby.stanford.edu gnu.emacs.help:143655 Original-To: help-gnu-emacs@gnu.org 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:39257 Archived-At: >>>>> "Toto" == Thorsten Bonow writes: [...] Toto> So I think what's wrong with xscope.el is the "do I need to update the Toto> database" algorithm. I made some additional tests which led to confusing results. Nevertheless I think they are useful if somebody wants to tackle the original problem of speeding up cscope for large projects as the linux kernel source. 1.) Trying to add the "-q" option to xcscope in my opinion is a step in the wrong direction: First of all I didn't manage to patch xcscope/cscope-indexer without performance going to hell, but then I tried using cscope *without* Emacs/xcscope and realised the following: If the database is build with the "-q" switch, after loading it cscope searches much faster in it compared to a database created without it, *but* exiting and restarting cscope would take much, much longer. Since xcscope.el uses cscope with the "one shot" option (-L), it has to restart and load the database for every search request: That is the reason why performance went down so badly. 2.) Trying to keep cscope running all the time (e.g. with the "-l" option) as discussed in the EmacsWiki (http://www.emacswiki.org/cgi-bin/wiki/CScopeAndEmacs) and put to test in bscope.el (http://groups.google.de/group/gnu.emacs.sources/browse_thread/thread/6e087f36c31336b8/92f00c90361f07da?hl=en) has the major drawback that the database is not updated between search requests. But in this case I have to compare search times to xcscope's behaviour when the `cscope-do-not-update-database' variable is set to a non-nil value (you can do this manually, via customise or in the "options" sub-menu of the xcscope menu): On my Athlon 700 box, searching for the global definition of a symbol took less than 2 seconds---in my opinion an acceptable time which should be even smaller on a more modern system. So, the way I see it your best bet is to disable automatic updating of the database and do it manually in your coffee breaks ;-) GNU global/gtags supports incremental updates, is sporting a nice Emacs interface with xgtags.el (http://home.tiscali.de/mgidde/source/xgtags.el) but---alas---handles only the search for symbols, nothing fancy like cscope's search for global definitions etc. Hope that helps. Toto -- Contact information and PGP key at http://www-users.rwth-aachen.de/thorsten.bonow You will pay for your sins. If you have already paid, please disregard this message.