From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: Long delay after M-x commandname Date: Tue, 12 Oct 2021 12:07:57 +0200 Message-ID: <878ryysghu.fsf@web.de> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10107"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Stefan Monnier To: Stefan Monnier via Users list for the GNU Emacs text editor Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 12 12:09:03 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1maEiT-0002QV-UH for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 12 Oct 2021 12:09:01 +0200 Original-Received: from localhost ([::1]:36474 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maEiS-0006JG-5M for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 12 Oct 2021 06:09:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49764) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maEha-0006J6-Ic for help-gnu-emacs@gnu.org; Tue, 12 Oct 2021 06:08:07 -0400 Original-Received: from mout.web.de ([212.227.17.12]:59575) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maEhY-0003f3-SJ for help-gnu-emacs@gnu.org; Tue, 12 Oct 2021 06:08:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1634033279; bh=rWO+r7JHOoI4YwjiDFRqIUnCbB9OHanQ+/wtU8zcHsI=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=ULIawbElKW2ATDRXBC4536YSPB/wMVdagorPaJKFjrl/X0SUyhemSKqc20rJDbXT3 AY/woZaDMZn1RRUEYTIOkZz+IySPPItDIVW6F3vvx/bOzkTgD19/NKYASCi9eMHgf6 JVg7qKx1kKPnRklkwMYwijcdUHHeYyiMS93ozdWg= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from drachen.dragon ([92.208.225.87]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LnB1F-1nEldq0VCv-00hNsb; Tue, 12 Oct 2021 12:07:59 +0200 In-Reply-To: (Stefan Monnier via Users list for the's message of "Mon, 11 Oct 2021 00:03:19 -0400") X-Provags-ID: V03:K1:sw7qZqO2AY9VpdodJK5cu34xE4er0bZRGk1KNPyOHdxzDnsxMLp fkodQ8RE0KxH7dL81JCi7mm3ANvJPvE7+fC4IYl7t1sC1TCLvJQvpI8btaNu8Sf826Jozsw GSyggFfFwhC+zkLNIbnre2m/kmu+Wc2P7MLla885alkry1Apd8wLoJECo331mUJ6p+epvIe UhbSKAIjr/VpO/uHIePMA== X-UI-Out-Filterresults: notjunk:1;V03:K0:2JiFChv/bfE=:7sU8+sHzwjIf0ORujLf2yc wnqY4twhyrdwpXFxp1tEhR2RTEObL3PqOh8xWlHfRu557jm6G40DBBdmixPlRFGXNY8pTOfQD 2EWE8yI01gNXdaW214sC3RcAN0KD6+Z2Uz5RSV+v/d0VeFOgNedw6ef3eeyn8mmpaLLBK0Bkn BXWBXfHO0Xtt49mTuy1IeywTfQ+6gdMBwm3/p0ZhksrQ9ELvJl9SmGxq3aY3YM1U1O7i4uvhE aaJjlFbz57S+DTXPqHqPagl/T5vhBSBvBQlnM/x6YPHVtiQ1rxdJuiVR1s2acMyjNqZXE1O2/ QCWIjEfYtvkzeoZ5PQhRvwoPxJpHmwc2b0d0lVavTGU5OajoGpo1/uu6i+aglXOpBGE9HoGNy dgYcBlWkX1IRHR5LkvIiFHZLZCJfm+/H+fNPZxkBYlsE90NjZH9rwvYs9rV9lV/J1veeIOeFF PT2xVRx4qUNqxwDcer0z6ZuZyy4zE5HE5pWAOV5g+FOugDwdPHxT67fVsdctS+93iwHsvqd+X K4POehTTbc54O+g40iAPF2aGYAV5y1h+Lp1m7qSJ6R3RTbyUzxj96qmA4PxegRJFZPt8rhzyd 4/9yDg56dxLBasLdeL/FvzJISVgzNiyDcTySooqGs3eTCC+BJ6ZWi0CkXVeDNGWyQl0Xnv5jw RaDv/ZZuMWhFQb0rmOdpJnhLGBseON6HUx2J21Gsp5WoZzSvKoQwCqCS8v/6/yp+WYm+M3Fb6 K1CfcMO667WEkftC6TlLfzc90Qbuc8Am+5NxWxYoreoay36QOZ/qmOOmwibFeKiljxlLaELl Received-SPF: pass client-ip=212.227.17.12; envelope-from=michael_heerdegen@web.de; helo=mout.web.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:133751 Archived-At: 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 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.