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: Sat, 09 Apr 2016 10:25:43 +0300	[thread overview]
Message-ID: <83vb3ri6q0.fsf@gnu.org> (raw)
In-Reply-To: <4424e043-31c7-0da4-213a-ee8ac31d9265@yandex.ru> (message from Dmitry Gutov on Sat, 9 Apr 2016 06:12:29 +0300)

> Cc: 23223@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Sat, 9 Apr 2016 06:12:29 +0300
> 
> >> I was hoping you could serve as a liaison in that, being the sole user of id-utils that I know of, so far.
> >
> > I could do that, but given the explanation above of what -w means, it
> > will hardly help us, right?
> 
> It might if -w were to be improved, though. We can request for it to be 
> smarter and do the post-filtering itself, using a language-aware 
> scanner. Even if no other feature is added, the accuracy of results will 
> improve for all users of id-utils, and Emacs will automatically end up 
> having to do less work for this feature.
> 
> That's not pressing, though.

I agree.

> > I'm not sure I understand what you have in mind for that, though.  Are
> > you going to switch the major mode of the temporary buffer as
> > determined by the file name of each match?
> 
> Yes. We can avoid switching if the major mode of the previous match was 
> the same as the current one. Having too many major modes involved in one 
> search is highly unlikely, so the switching overhead shouldn't be too 
> much of a problem, actually.

Would it help to only use the mode's syntax table, and avoid switching
on the major mode as a whole?

> Anyway, whether we "take a hint" or not, we're going to end up with 
> imperfect results: if we don't visit the target buffers, we're going to 
> have to ignore all the ways Emacs allows specifying the major mode, 
> aside from auto-mode-alist ("mode: " specification, 
> interpreter-mode-alist, magic-mode-alist, magic-fallback-mode-alist).

That problem is relevant for IDutils as well (the scanner is
determined by the file's extension only), so we already have a certain
(hopefully, small) number of misses and false positives.  I think this
cannot be entirely avoided.  So maybe we shouldn't try so hard
avoiding false positives.  E.g., the "M-x gid" command, which comes
with IDutils and is a trivial wrapper around lid invocation, simply
shows the output in a Grep-like buffer, through which you can step
with next-error.  It is lightning-fast: what takes 13 sec with
xref-find-references, takes less than 2 sec with "M-x gid".

> Hmm. Maybe we can still support most of those using 
> (insert-file-contents "file-name" nil 0 200), at the cost of some extra 
> overhead.

Perhaps use insert-file-contents-literally, as decoding could slow
down things considerably.  You are only looking for ASCII text.  Also
note that a mode can be specified in file-local variables at the
file's end, though.





  reply	other threads:[~2016-04-09  7:25 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 [this message]
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=83vb3ri6q0.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.