From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Sheng Yang" Newsgroups: gmane.emacs.bugs Subject: bug#45379: 28.0.50; Degraded Performance of describe-buffer-bindings Date: Tue, 13 Apr 2021 22:06:29 -0500 Message-ID: References: <87v996rqm7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=b6b26e12b04b420c95ab9adc87599d43 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31521"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.5.0-alpha0-273-g8500d2492d-fm-20210323.002-g8500d249 Cc: Juri Linkov , 45379@debbugs.gnu.org, Stefan Kangas , Stefan Monnier , Stephen Berman To: handa , "Eli Zaretskii" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 14 05:07:12 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 1lWVry-00083p-Dl for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Apr 2021 05:07:11 +0200 Original-Received: from localhost ([::1]:36864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWVrx-0000gG-DL for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Apr 2021 23:07:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49690) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWVrq-0000g7-EW for bug-gnu-emacs@gnu.org; Tue, 13 Apr 2021 23:07:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49754) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lWVrq-0001th-6n for bug-gnu-emacs@gnu.org; Tue, 13 Apr 2021 23:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lWVrq-00064E-0p for bug-gnu-emacs@gnu.org; Tue, 13 Apr 2021 23:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Sheng Yang" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Apr 2021 03: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: confirmed patch Original-Received: via spool by 45379-submit@debbugs.gnu.org id=B45379.161836961923311 (code B ref 45379); Wed, 14 Apr 2021 03:07:01 +0000 Original-Received: (at 45379) by debbugs.gnu.org; 14 Apr 2021 03:06:59 +0000 Original-Received: from localhost ([127.0.0.1]:33067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWVrn-00063v-3d for submit@debbugs.gnu.org; Tue, 13 Apr 2021 23:06:59 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:34255) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWVrk-00063i-Qw for 45379@debbugs.gnu.org; Tue, 13 Apr 2021 23:06:58 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id A1E0C5C1682; Tue, 13 Apr 2021 23:06:51 -0400 (EDT) Original-Received: from imap2 ([10.202.2.52]) by compute6.internal (MEProxy); Tue, 13 Apr 2021 23:06:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type; s=fm2; bh=v9ekw1jIbIHZFe4/ow+3336xJ4tQ0RT +povgVt0wXfQ=; b=Zu6yKEH8JDLEKef+uqW6+wNYOGeB+R420bMujuqV0pXSclM KWmPUAuQFrfJlaYtPxgjm8yfO+3w4ZR/q9U+EBt96zevh/TPEeBNpAYReG0okeXu /ND4jRqbn1cOxO4Qn7RzRoeUDG9Y2PROHggt4T+w5lHbqHzJYaF2yH3wieBO/tx2 3O9M+RvpCvz8Yqn6TqsSYYz/Y2Ribo5N9WgBQajYWGP/Ls3ZkyX6DGgXaS3ym1i5 ukC5RIEaf5s55pusU37PMqKZ73ZiJYtfq4Z5OLaYpfcRz9r5FQKBLR+tsSF/+OaA Z6LT324WOCIMgwECiLyxWFBxyorqnlzEg1E5/fw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=v9ekw1 jIbIHZFe4/ow+3336xJ4tQ0RT+povgVt0wXfQ=; b=CYMhNS7AHlVcS1TqSKJ6rA UXOeugC5m4eij/IReH8Y9YMdL6nln/dBrPHTqZj01AE4BK8ArmpOhLcDPn8H0e1A TGJwIk80GI41N7xV+EiiqLDQ8A/8YXX8h/BlG9ikS5LZ5BQG1M+IZDNka6L1zID6 83vOhX0AcgVezVePZLQWXGwth0/Leu4K6tdTuugqi+YPNGLitLeV40nz3djI/y+5 6WaWreZElPB2VcrCfsghvpDW63tuBI2s4BUNbP9AYwA5BIP8tQrMkxmINN2wdlC3 ujLCXQCOioAfg36iO8ino/RJL95iAP3RvYwl1k8rOH4AeTZiPj0DO5FX4cqb9Shg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudeltddgieeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesrgdtreerreerjeenucfhrhhomhepfdfuhhgv nhhgucgjrghnghdfuceoshhthigrnhhgsehfrghsthhmrghilhdrtghomheqnecuggftrf grthhtvghrnhepheeluedtudffffegffeileettedvudeihefhvefgvdeivddttdeifeei geegveejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epshhthigrnhhgsehfrghsthhmrghilhdrtghomh X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 59713A00490; Tue, 13 Apr 2021 23:06:50 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: <87v996rqm7.fsf@gnu.org> 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:203994 Archived-At: --b6b26e12b04b420c95ab9adc87599d43 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Any update on this? Having been using the patch for a few weeks now, see= ms fine for me. On Thu, Apr 1, 2021, at 10:06, handa wrote: > In article <838s65ktvk.fsf@gnu.org >,= Eli Zaretskii > writes: >=20 > > > > Is the patch for the above improvement the one included in the f= ile > > > > 0001-Fix-describe-buffer-bindings-performance-regression.patch? > > >=20 > > > Yes, it is. >=20 > 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: >=20 > > > Don't show key ranges if shadowed by different commands > > >=20 > > > * src/keymap.c (describe_vector): Make sure found consecutive = keys > > > are either not shadowed or, if they are, that they are shadowe= d by > > > the same command. (Bug#9293) >=20 > In describe_vector, if VECTOR is a char-table, char_table_ref_and_rang= e > 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. >=20 > But, I don't know whether the following part in the patch is correct o= r > not. >=20 > + /* Ignore `self-insert-command' for performance. */ > + && !EQ (definition, Qself_insert_command)) >=20 > --- > K. Handa > handa@gnu.org >=20 Sheng Yang(=E6=9D=A8=E5=9C=A3), PhD Computer Science Department University of Maryland, College Park E-mail: styang@fastmail.com E-mail (old but still used): yangsheng6810@gmail.com --b6b26e12b04b420c95ab9adc87599d43 Content-Type: text/html;charset=utf-8 Content-Transfer-Encoding: quoted-printable
Any update on t= his? Having been using the patch for a few weeks now, seems fine for me.=

On Thu, Apr 1, 2021, at 10:06, handa wrote= :
In articl= e <838s65ktvk.fsf@gnu.org= >, Eli Zaretskii <eliz@gnu.o= rg> writes:

> > > Is the pa= tch 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_r= ange introduced by the commit below:

> &= gt;     Don't show key ranges if shadowed by differe= nt commands
> > 
> > &= nbsp;   * src/keymap.c (describe_vector): Make sure found cons= ecutive keys
> >     are either = not shadowed or, if they are, that they are shadowed by
&g= t; >     the same command.  (Bug#9293)

In describe_vector, if VECTOR is a char-table, c= har_table_ref_and_range
is already called at the fairly be= ginning of the main loop.  So, we do
not have to call= it again, and thus, I think the patch is doing the
correc= t thing.

But, I don't know whether the foll= owing part in the patch is correct or
not.
<= br>
+   /* Ignore `self-insert-command' for performance.&= nbsp; */
+   && !EQ (definition, Qself_insert= _command))

---
K. Handa
<= div>

Sheng Yang(=E6=9D=A8=E5=9C=A3), PhD
Computer Science Department
University of Maryland, College Park
E-mail (old but still used): yangsheng6810@gmail.com


--b6b26e12b04b420c95ab9adc87599d43--