From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23223: 25.0.92; Can xref-find-references be sped up? Date: Wed, 06 Apr 2016 20:12:27 +0300 Message-ID: <8360vumzk4.fsf@gnu.org> References: <83pou4m6h7.fsf@gnu.org> <902ac022-3a76-c363-0c77-12b1cdb8d521@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1459962804 3660 80.91.229.3 (6 Apr 2016 17:13:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Apr 2016 17:13:24 +0000 (UTC) Cc: 23223@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 06 19:13:11 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1anr0v-0001Z7-1R for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Apr 2016 19:13:09 +0200 Original-Received: from localhost ([::1]:44554 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anr0u-0003zX-0v for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Apr 2016 13:13:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37392) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anr0p-0003wz-4t for bug-gnu-emacs@gnu.org; Wed, 06 Apr 2016 13:13:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anr0o-0000Rz-68 for bug-gnu-emacs@gnu.org; Wed, 06 Apr 2016 13:13:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39647) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anr0o-0000Rv-3M for bug-gnu-emacs@gnu.org; Wed, 06 Apr 2016 13:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1anr0n-0005OK-VH for bug-gnu-emacs@gnu.org; Wed, 06 Apr 2016 13:13:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Apr 2016 17:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23223 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23223-submit@debbugs.gnu.org id=B23223.145996277820716 (code B ref 23223); Wed, 06 Apr 2016 17:13:01 +0000 Original-Received: (at 23223) by debbugs.gnu.org; 6 Apr 2016 17:12:58 +0000 Original-Received: from localhost ([127.0.0.1]:51984 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1anr0k-0005O3-Kx for submit@debbugs.gnu.org; Wed, 06 Apr 2016 13:12:58 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46335) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1anr0j-0005Nr-M0 for 23223@debbugs.gnu.org; Wed, 06 Apr 2016 13:12:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anr0Z-0000Om-GG for 23223@debbugs.gnu.org; Wed, 06 Apr 2016 13:12:52 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44998) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anr0Z-0000Oi-Db; Wed, 06 Apr 2016 13:12:47 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1908 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1anr0Y-0002lD-LZ; Wed, 06 Apr 2016 13:12:47 -0400 In-reply-to: <902ac022-3a76-c363-0c77-12b1cdb8d521@yandex.ru> (message from Dmitry Gutov on Wed, 6 Apr 2016 03:37:39 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:116120 Archived-At: > From: Dmitry Gutov > Date: Wed, 6 Apr 2016 03:37:39 +0300 > > On 04/05/2016 06:16 PM, Eli Zaretskii wrote: > > > The important part of the Lisp-level profile appears below. It looks > > like we are visiting each match of each file in the list of matches, > > and that takes most of the time. Can this be avoided somehow? The > > 'lid' command already includes all the matches in Grep format, so why > > are we visiting each match, when the information should be already > > available? > > Huh, yes, that's the area of optimization I've forgotten about (mostly > because of using plain Grep myself anyway). But using plain Grep has the same problem: Grep reports the hits, and we then go ahead and visit each hit, right? > If id-utils (and some other tools we delegate to) know symbol > boundaries, maybe we don't need to double-check. It should know. > However, Grep output, which 'lid --result=grep' also uses, only outputs > the line number, but not the starting column. > > Take this example: > > I'm searching for 'buffer'. The last line of the output looks like this: > > xmenu.c:832: set_buffer_internal_1 (XBUFFER (buffer)); > > How do I find the appropriate 'buffer' match in this line? You already have the code that looks for the match in each line. What I had in mind is looking in the output of Grep or lid, instead of visiting the file and looking in that file's buffer. Does this make sense? > Or can we ask 'lid' (and, ideally, Grep too) to include the column of a > match in the output? No, I don't think such an option exists. It could be a great enhancement request, though ;-) > Grep has colorized output, so I should be able to work with that. But > not 'lid', it seems. Another enhancement to request, I guess.