From: Michael Heerdegen <michael_heerdegen@web.de>
To: Stefan Monnier via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: Long delay after M-x commandname
Date: Tue, 12 Oct 2021 12:07:57 +0200 [thread overview]
Message-ID: <878ryysghu.fsf@web.de> (raw)
In-Reply-To: <jwvily4rz8e.fsf-monnier+emacs@gnu.org> (Stefan Monnier via Users list for the's message of "Mon, 11 Oct 2021 00:03:19 -0400")
Stefan Monnier via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
> It can take work to find that shortest replacement (it's a kind of
> brute-force algorithm which tries all combinations of increasing length
> until one works) [...]
I would expect that working with decreasing lengths and stop when there
are no more solutions would be more efficient (since starting with tiny
lengths has nearly no chance of success, especially when having a lot of
interned symbols, and the smaller lengths also seem to have the higher
costs.)
Apart from that, I get a significant improvement if I move the commandp
test out of the `try-completion' call and filter the obarray once for a
list of commands.
I will try to suggest a patch for the bug report. For the
`find-eev-install-intro' test case I get 0.6 instead of 2.5 seconds
here.
Michael.
next prev parent reply other threads:[~2021-10-12 10:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-11 0:45 Long delay after M-x commandname Eduardo Ochs
2021-10-11 4:03 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-10-11 12:07 ` Eli Zaretskii
2021-10-12 10:07 ` Michael Heerdegen [this message]
2021-10-12 0:19 ` Michael Heerdegen
2021-10-12 1:05 ` Eduardo Ochs
2021-10-12 1:59 ` Michael Heerdegen
2021-10-12 9:52 ` Michael Heerdegen
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=878ryysghu.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=help-gnu-emacs@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.
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).