From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#23223: 25.0.92; Can xref-find-references be sped up? Date: Wed, 6 Apr 2016 03:37:39 +0300 Message-ID: <902ac022-3a76-c363-0c77-12b1cdb8d521@yandex.ru> References: <83pou4m6h7.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1459903104 8246 80.91.229.3 (6 Apr 2016 00:38:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Apr 2016 00:38:24 +0000 (UTC) To: Eli Zaretskii , 23223@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 06 02:38:13 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 1anbU2-0005v1-2h for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Apr 2016 02:38:10 +0200 Original-Received: from localhost ([::1]:40036 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anbU0-0006gF-TP for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Apr 2016 20:38:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51032) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anbTx-0006dx-5O for bug-gnu-emacs@gnu.org; Tue, 05 Apr 2016 20:38:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anbTt-00038d-Tz for bug-gnu-emacs@gnu.org; Tue, 05 Apr 2016 20:38:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38492) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anbTt-00038S-QO for bug-gnu-emacs@gnu.org; Tue, 05 Apr 2016 20:38:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1anbTt-0005AA-JE for bug-gnu-emacs@gnu.org; Tue, 05 Apr 2016 20:38:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Apr 2016 00:38: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.145990306919828 (code B ref 23223); Wed, 06 Apr 2016 00:38:01 +0000 Original-Received: (at 23223) by debbugs.gnu.org; 6 Apr 2016 00:37:49 +0000 Original-Received: from localhost ([127.0.0.1]:50829 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1anbTg-00059k-U0 for submit@debbugs.gnu.org; Tue, 05 Apr 2016 20:37:49 -0400 Original-Received: from mail-wm0-f51.google.com ([74.125.82.51]:36570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1anbTf-00059X-4g for 23223@debbugs.gnu.org; Tue, 05 Apr 2016 20:37:47 -0400 Original-Received: by mail-wm0-f51.google.com with SMTP id v188so5817382wme.1 for <23223@debbugs.gnu.org>; Tue, 05 Apr 2016 17:37:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=2eLYy1km8lHv0cCQ315TFiLi8ABHOexmlQxYcqPq0hk=; b=Y0ZfLAgks20RkCYPcIGb44twsWDpEOIIQIvqhS2c3GXpi+mh+jC14vOX1uACGSU1w/ ikI/bi4wiYVXqPHURkziQD6cf1cJWl4OzLM4k5VKOOslaUR0x/lPii71nm2aFbg7B8tu Vw/U0n4Y2P/CNcymQjjdUDNe4zvpBXk58phZZz5j1MQ6oOr5akGC3bmW/d+x9lS/IvN0 kvE7bbkncZoXvc9jq3uCtodb4lUkMQobEbPecwQHD9HQbIPQZEFFiiOeMdxHgK7hm82a 26EJSNYRuxmnb/8Em2Bes5gNiI0L21k2g9+NTeIUHVJK0QwDiyDsoPttT6HepPiioClk sdLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=2eLYy1km8lHv0cCQ315TFiLi8ABHOexmlQxYcqPq0hk=; b=md1zWmrykHMFvCxVVdLShFnD7fBSVq5VMlkRVbq8VJz2ox6QrrrywT82wJ3vcfd7HG 6EVNMrjtdKFJ/saCDlYh8dOVKAYMtAtV1YW7EvgE8l/vJ5mAi5tIpElA4eDM+CJ96Rsw gr2UC0FYo1al5RDdZGeizHTjxErA1BynwJuvsO+FrkpauXWpiOXw8+gefhugeFgg/8vF N+mFALONJ7mkSN3KnVUCTgzF6PFNxX1cyEyJN4AAihjkqw+BLhSKcmijmza+bNmbaS4P SWwvfiwktvLQ0apIps17ctY41pg0Rts4KeGQYvTzp57kxhV4878IdyZ3r3Vx84Rz4al+ LipQ== X-Gm-Message-State: AD7BkJI3i5cA3dIfYSsG3NpgOL9mUVuLLtbKmD2s+IA2WQx7hIh+PqvQkbggMUVn4QxGEg== X-Received: by 10.194.92.237 with SMTP id cp13mr21881951wjb.168.1459903061617; Tue, 05 Apr 2016 17:37:41 -0700 (PDT) Original-Received: from [192.168.1.2] ([185.105.175.24]) by smtp.googlemail.com with ESMTPSA id u3sm21933360wmg.15.2016.04.05.17.37.40 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 05 Apr 2016 17:37:40 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 In-Reply-To: <83pou4m6h7.fsf@gnu.org> 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:116102 Archived-At: 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). If id-utils (and some other tools we delegate to) know symbol boundaries, maybe we don't need to double-check. 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? Or can we ask 'lid' (and, ideally, Grep too) to include the column of a match in the output? And when there are several matches on the same line, output that line multiple times? Grep has colorized output, so I should be able to work with that. But not 'lid', it seems.