unofficial mirror of bug-gnu-emacs@gnu.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: Tue, 12 Apr 2016 18:50:49 +0300	[thread overview]
Message-ID: <83h9f6g71i.fsf@gnu.org> (raw)
In-Reply-To: <90b81ad1-c3ab-272b-724b-ba63f0451d5a@yandex.ru> (message from Dmitry Gutov on Tue, 12 Apr 2016 02:25:54 +0300)

> Cc: 23223@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Tue, 12 Apr 2016 02:25:54 +0300
> 
> > Unfortunately, it seems to miss matches: out of 1127 matches of
> > current_buffer with the original version, the new one only shows 963.
> > It sounds like some conditions on what exactly is a symbol need
> > adjustment,
> 
> Ooh, that's a great catch, thanks! Turns out, auto-mode-alist wasn't 
> getting applied because buffer-file-name wasn't set. Fixing that added 
> ~25% performance hit, so I also added xref--find-buffer-visiting to 
> cache the expensive lookup mentioned previously. See the new patch attached.
> 
> That seems to about exhaust the optimization opportunity here.

LGTM, please push.

Btw, I noticed another strange thing, but I was only able to reproduce
it with the current version, before your patch: the set of results
returned by xref-find-references, when it uses IDUtils, is not
entirely repeatable.  Sometimes, a few matches, sometimes a few dozen
of them, are missing.  I have no idea why; the lid command
consistently returns the same number of lines each time I invoke it.

> >   semantic-symref-derive-find-filepatterns: Customize ‘semantic-symref-filepattern-alist’ for lisp-interaction-mode
> >
> > unless I invoke xref-find-references from a buffer in C mode.
> 
> ...or the current major mode is one of the currently supported ones, via 
> the above variable.
> 
> > Curiously, this doesn't happen when there's an ID file and IDutils is
> > invoked.  Is this expected?
> 
> Yes. semantic-symref-filepattern-alist is defined in and used by 
> semantic/symref/grep.el. We can add (lisp-interaction-mode "*.el") to it.

I think we should do that, yes.

Thanks.





  reply	other threads:[~2016-04-12 15:50 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
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 [this message]
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83h9f6g71i.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).