all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 23223@debbugs.gnu.org
Subject: bug#23223: 25.0.92; Can xref-find-references be sped up?
Date: Wed, 06 Apr 2016 20:12:27 +0300	[thread overview]
Message-ID: <8360vumzk4.fsf@gnu.org> (raw)
In-Reply-To: <902ac022-3a76-c363-0c77-12b1cdb8d521@yandex.ru> (message from Dmitry Gutov on Wed, 6 Apr 2016 03:37:39 +0300)

> From: Dmitry Gutov <dgutov@yandex.ru>
> 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.





  parent reply	other threads:[~2016-04-06 17:12 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-05 15:16 bug#23223: 25.0.92; Can xref-find-references be sped up? Eli Zaretskii
2016-04-06  0:37 ` Dmitry Gutov
2016-04-06 15:09   ` Dmitry Gutov
2016-04-06 17:20     ` Eli Zaretskii
2016-04-06 23:11       ` Dmitry Gutov
2016-04-07  2:49         ` Eli Zaretskii
2016-04-06 17:12   ` Eli Zaretskii [this message]
2016-04-07  0:11     ` Dmitry Gutov
2016-04-07 15:03       ` Eli Zaretskii
2016-04-09  3:12         ` Dmitry Gutov
2016-04-09  7:25           ` Eli Zaretskii
2016-04-10 23:27             ` Dmitry Gutov
2016-04-11 15:56               ` Eli Zaretskii
2016-04-11 23:25                 ` Dmitry Gutov
2016-04-12 15:50                   ` Eli Zaretskii
2016-04-12 18:49                     ` Dmitry Gutov
2016-04-12 19:16                       ` Eli Zaretskii
2016-04-12 20:26                         ` Dmitry Gutov
2016-04-13  2:44                           ` Eli Zaretskii
2016-04-13 10:18                             ` Dmitry Gutov
2016-04-13 15:16                               ` Eli Zaretskii
2016-04-15 14:29                                 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8360vumzk4.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=23223@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.