From: Helmut Eller <eller.helmut@gmail.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 50906@debbugs.gnu.org
Subject: bug#50906: xref-find-references blocks Emacs: asynchronous operation?
Date: Tue, 05 Oct 2021 20:09:43 +0200 [thread overview]
Message-ID: <m2lf37e42g.fsf@gmail.com> (raw)
In-Reply-To: <6f2c07d4-3e29-44c0-bb7f-c37905b3e12b@yandex.ru> (Dmitry Gutov's message of "Tue, 5 Oct 2021 19:38:36 +0300")
On Tue, Oct 05 2021, Dmitry Gutov wrote:
> A really fast searcher solves the biggest part of the problem, but
> we'd still be left with very imprecise searches (many matches) locking
> up Emacs for seconds, since the Lisp overhead processing a match is
> unavoidably larger than the time it takes for a search program to
> print it. Using lazy sequences could allow us some leeway as well --
> namely, processing only the first N hits initially, and then
> processing the rest only if the user requests that.
>
> If we only target this kind of improvement, the "abort" functionality
> could wait.
Yes, limiting the time that Emacs is locked up, by limiting the number of
hits that Emacs accepts in one chunk, seems like the way to go.
> We'd still need to choose between sorting the results and
> saving on parsing the output buffer eagerly, though.
Theoretically it should be possible to sort the first chunk and display
it. Then, when the next chunk arrives, merge it in, à la heap-sort, and
update the display accordingly. Probably not worth the effort, though.
Also, I think that the only "sorting" that we actually do, is grouping
by filename. And that doesn't seem all that important to me.
Helmut
next prev parent reply other threads:[~2021-10-05 18:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-29 22:49 bug#50906: xref-find-references blocks Emacs: asynchronous operation? Stefan Kangas
2021-09-30 7:44 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-05 1:59 ` Dmitry Gutov
2021-10-05 5:18 ` Arthur Miller
2021-10-05 15:11 ` Dmitry Gutov
2021-10-05 6:29 ` Helmut Eller
2021-10-05 16:38 ` Dmitry Gutov
2021-10-05 18:09 ` Helmut Eller [this message]
2021-10-05 19:24 ` Dmitry Gutov
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=m2lf37e42g.fsf@gmail.com \
--to=eller.helmut@gmail.com \
--cc=50906@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.