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 03:59:28 +0200 Message-ID: <87czobvw8v.fsf@web.de> References: <87ily3w0w1.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24056"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Cancel-Lock: sha1:EbpjtaKsouuFDnqQkIk1ES2n5lI= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 12 04:01:17 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 1ma76T-00067T-MR for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 12 Oct 2021 04:01:17 +0200 Original-Received: from localhost ([::1]:35142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ma76R-0007Sw-Jn for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 11 Oct 2021 22:01:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ma74s-0007Sk-Lq for help-gnu-emacs@gnu.org; Mon, 11 Oct 2021 21:59:40 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:34738) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ma74q-0007M8-89 for help-gnu-emacs@gnu.org; Mon, 11 Oct 2021 21:59:37 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1ma74n-0003x4-6O for help-gnu-emacs@gnu.org; Tue, 12 Oct 2021 03:59:33 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=geh-help-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:133736 Archived-At: Eduardo Ochs writes: > This takes 10 seconds: > > (execute-extended-command--shorter "find-eev-quick-intro" > "find-eev-qui") Wow - takes 36 seconds for me. In emacs -Q still 2 or 3 seconds. I think a bug report would definitely not be wrong. Here is the result of running the profiler (using my current session). I don't see anything obvious - no sit-for or so. Maybe it depends on completion-styles involved? Let's try ... eh, no, with the default styles enabled I still see 34 seconds. Maybe this just scales with the amount of loaded packages and "find-eev-quick-intro" is just very hard to shorten, dunno. Anyway, here is the profiler result: Elapsed time: 35.878s (including 1.239s in 1 GCs and excluding 0.479s of idle time) Conses: 511713 Vector-Cells: 42 Strings: 32135 String-Chars: 100 Symbols: 1.10411e+06 Floats: 606 Intervals: 138814 34239 100% - ... 33925 99% - read-from-minibuffer 33925 99% - command-execute 33925 99% - call-interactively 33925 99% - funcall-interactively 33886 98% - my-profiler-profile-next-command 33886 98% - my-measuring-idle-time 33886 98% - # 33886 98% - eval 33886 98% - benchmark-run 33886 98% - benchmark-call 33886 98% - # 33886 98% - progn 33886 98% - funcall-interactively 33886 98% - my-pp-eval-expression 33800 98% - pp-eval-expression 33800 98% - eval 33800 98% - progn 33800 98% - progn 33800 98% - execute-extended-command--shorter 33760 98% - completion-try-completion 33760 98% - completion--nth-completion 33756 98% - completion--some 33756 98% - # 19670 57% - completion-pcm-try-completion 19566 57% - completion-pcm--find-all-completions 19562 57% - completion-pcm--all-completions 4 0% completion-pcm--pattern->regex 104 0% - completion-pcm--merge-try 72 0% completion-pcm--merge-completions 10354 30% - completion-substring-try-completion 10354 30% - completion-substring--all-completions 10350 30% completion-pcm--all-completions 3732 10% completion-emacs22-try-completion 4 0% completion--styles 8 0% - execute-extended-command--shorter-1 [...] Michael