GNU bug report logs - #23223
25.0.92; Can xref-find-references be sped up?

Previous Next

Package: emacs;

Reported by: Eli Zaretskii <eliz <at> gnu.org>

Date: Tue, 5 Apr 2016 15:17:02 UTC

Severity: normal

Found in version 25.0.92

Fixed in version 25.1

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #47 received at 23223 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 23223 <at> debbugs.gnu.org
Subject: Re: bug#23223: 25.0.92; Can xref-find-references be sped up?
Date: Tue, 12 Apr 2016 18:50:49 +0300
> Cc: 23223 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov <at> 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.




This bug report was last modified 9 years and 92 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.