From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: handa Newsgroups: gmane.emacs.bugs Subject: bug#45379: 28.0.50; Degraded Performance of describe-buffer-bindings Date: Fri, 02 Apr 2021 00:06:40 +0900 Message-ID: <87v996rqm7.fsf@gnu.org> References: <87a6u5m566.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3491"; mail-complaints-to="usenet@ciao.gmane.io" Cc: stephen.berman@gmx.net, stefan@marxist.se, juri@linkov.net, styang@fastmail.com, monnier@iro.umontreal.ca, 45379@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 01 17:07:11 2021 Return-path: Envelope-to: geb-bug-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 1lRyub-0000jn-RR for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Apr 2021 17:07:09 +0200 Original-Received: from localhost ([::1]:56622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRyua-0003Di-LR for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Apr 2021 11:07:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRyuT-0003DW-W5 for bug-gnu-emacs@gnu.org; Thu, 01 Apr 2021 11:07:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46727) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lRyuT-0005Ad-P8 for bug-gnu-emacs@gnu.org; Thu, 01 Apr 2021 11:07:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lRyuT-0002iN-Kb for bug-gnu-emacs@gnu.org; Thu, 01 Apr 2021 11:07:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: handa Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Apr 2021 15:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45379 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch confirmed Original-Received: via spool by 45379-submit@debbugs.gnu.org id=B45379.161728961810425 (code B ref 45379); Thu, 01 Apr 2021 15:07:01 +0000 Original-Received: (at 45379) by debbugs.gnu.org; 1 Apr 2021 15:06:58 +0000 Original-Received: from localhost ([127.0.0.1]:58273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRyuP-0002i5-Qi for submit@debbugs.gnu.org; Thu, 01 Apr 2021 11:06:58 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48434) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRyuO-0002hr-FN for 45379@debbugs.gnu.org; Thu, 01 Apr 2021 11:06:56 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56249) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRyuH-00053j-DX; Thu, 01 Apr 2021 11:06:49 -0400 Original-Received: from fl1-60-236-248-230.iba.mesh.ad.jp ([60.236.248.230]:52042 helo=shatin) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lRyuF-0001N4-2A; Thu, 01 Apr 2021 11:06:48 -0400 Original-Received: from handa by shatin with local (Exim 4.93) (envelope-from ) id 1lRyu9-0008Lx-1D; Fri, 02 Apr 2021 00:06:41 +0900 In-Reply-To: <838s65ktvk.fsf@gnu.org> (message from Eli Zaretskii on Tue, 30 Mar 2021 10:01:19 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:203429 Archived-At: In article <838s65ktvk.fsf@gnu.org>, Eli Zaretskii writes: > > > Is the patch for the above improvement the one included in the file > > > 0001-Fix-describe-buffer-bindings-performance-regression.patch? > > > > Yes, it is. It seems that the main intention of that patch is to avoid unnecessary call of char_table_ref_and_range introduced by the commit below: > > Don't show key ranges if shadowed by different commands > > > > * src/keymap.c (describe_vector): Make sure found consecutive keys > > are either not shadowed or, if they are, that they are shadowed by > > the same command. (Bug#9293) In describe_vector, if VECTOR is a char-table, char_table_ref_and_range is already called at the fairly beginning of the main loop. So, we do not have to call it again, and thus, I think the patch is doing the correct thing. But, I don't know whether the following part in the patch is correct or not. + /* Ignore `self-insert-command' for performance. */ + && !EQ (definition, Qself_insert_command)) --- K. Handa handa@gnu.org