[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Long delay after M-x commandname

From: Michael Heerdegen
Subject: Re: Long delay after M-x commandname
Date: Tue, 12 Oct 2021 12:07:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Stefan Monnier via Users list for the GNU Emacs text editor
<> 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

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]