GNU bug report logs - #45379
28.0.50; Degraded Performance of describe-buffer-bindings

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: styang@HIDDEN; Keywords: patch confirmed; merged with #47494, #47565, #48812; dated Wed, 23 Dec 2020 06:03:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Merged 45379 47494 47565 48812. Request was from Eli Zaretskii <eliz@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 45379 <at> debbugs.gnu.org:


Received: (at 45379) by debbugs.gnu.org; 13 May 2021 10:10:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 13 06:10:45 2021
Received: from localhost ([127.0.0.1]:41389 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lh8Ij-0001Md-A8
	for submit <at> debbugs.gnu.org; Thu, 13 May 2021 06:10:45 -0400
Received: from eggs.gnu.org ([209.51.188.92]:46674)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1lh8If-0001MM-GB
 for 45379 <at> debbugs.gnu.org; Thu, 13 May 2021 06:10:40 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:36426)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1lh8IY-0006Rn-AX; Thu, 13 May 2021 06:10:30 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2783
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1lh8IX-0005yd-SV; Thu, 13 May 2021 06:10:30 -0400
Date: Thu, 13 May 2021 13:10:38 +0300
Message-Id: <83o8df0wrl.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <CADwFkm=JH2KOEhSySifL6XYT5KdJYHROgb4c4oLMq54rMjgsHw@HIDDEN>
 (message from Stefan Kangas on Tue, 4 May 2021 18:31:10 -0500)
Subject: Re: bug#45379: 28.0.50;
 Degraded Performance of describe-buffer-bindings
References: <02f717c6-dc96-4ba0-9117-2ef079ac556f@HIDDEN>
 <CADwFkmn=GnQRNYbiA=zV8F1kPY+B5qHz4QhzvgkQMOia_x77Yw@HIDDEN>
 <CADwFkmkgYWQOzDP7WaYeyS5pS3ZA7iY4Fs-1F2Gymtata7A8nw@HIDDEN>
 <CADwFkm=JH2KOEhSySifL6XYT5KdJYHROgb4c4oLMq54rMjgsHw@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 45379
Cc: juri@HIDDEN, styang@HIDDEN, handa@HIDDEN, stephen.berman@HIDDEN,
 rudalics@HIDDEN, monnier@HIDDEN, 45379 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Stefan Kangas <stefan@HIDDEN>
> Date: Tue, 4 May 2021 18:31:10 -0500
> Cc: Juri Linkov <juri@HIDDEN>, martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, 
> 	45379 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>, 
> 	Stephen Berman <stephen.berman@HIDDEN>, Kenichi Handa <handa@HIDDEN>
> 
> I finally had time/energy to look into this again!  Sorry for taking
> more time than expected.

Thanks.  And I have finally found enough free time to review this.  A
couple of comments below, and then I'm okay with installing these
changes.

> > 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))
> 
> (This is explained below.)

And I have a comment for that explanation.

> >        Lisp_Object val, tem2;
> >
> >        maybe_quit ();
> >
> > -      if (i == stop)
> > -	{
> > -	  if (i == to)
> > -	    break;
> 
> This is a bit complicated to follow, so I have cleaned it up.

I don't see the modified code regarding this to/stop issue as more
clear than the original one.  In both cases there's a special test
which then sets stop = to.  I needed to read the new code several
times to convince myself we perform the same amount of run-time tests
inside the loop.  So I'd prefer to leave this nit alone, as it was in
the original code.  If you find that somewhat unclear, how about
adding a comment there explaining whatever it was unclear to you when
you first read that?

> > @@ -3047,10 +3035,12 @@ describe_vector (Lisp_Object vector, Lisp_Object prefix, Lisp_Object args,
> >
> >        /* Make sure found consecutive keys are either not shadowed or,
> >  	 if they are, that they are shadowed by the same command.  */
> > -      if (CHAR_TABLE_P (vector) && i != starting_i)
> > +      if (CHAR_TABLE_P (vector) && i != starting_i
> > +	  /* Ignore `self-insert-command' for performance.  */
> > +	  && !EQ (definition, Qself_insert_command))
>               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> To see if the shadowing is the same for an entire range, we need to run
> shadow_lookup() for *once for each character* in that range to see if
> they are shadowed.  This is expensive.
> 
> One observation is that we often have *very long* ranges of characters
> where the value is "self-insert-command", as in:
> 
>     (lookup-key global-map "文")
> 
> This is because a char-table will cover the range of all valid character
> codes.  [Note again that we use a char-table only if the keymap is
> defined with `make-keymap' (as opposed to `make-sparse-keymap', which is
> just a list)]
> 
> Let's just assume that it is unlikely that there is any shadowing going
> on for all of these self-inserting keys.  If there is shadowing going
> on, we are probably not looking at a keymap where we have the default
> value is set to self-insert-command.
> 
> So we basically say here: let's just not care about
> `self-insert-command' and skip the check.  Yes, we will in theory not
> get a perfect result, as there will be some cases where we miss the
> shadowing.  OTOH, we are sure to have something that is not very slow.
> (And in any case, I don't know of any examples where this will fail, and
> if they exist we will in any case already be doing better than Emacs 27,
> as this entire check is new in Emacs 28.)

To tell the truth, I'm a bit worried by this "assumption", and so was
Handa-san.  This part of the change looks to me like simply ignoring a
legitimate situation which we previously supported, and now will not,
for the sole reason that the test is slow.  Who can tell us what this
could cause in some code somewhere in the community?  "Don't know any
examples where it will fail" is not very assuring, IMO.

Is this part of the change what speeds up describe-buffer-bindings?
Or is this just part of the speedup?  In the latter case, how much
faster will describe-buffer-bindings become without this
"optimization"?  And in the former case, I'd prefer to have this
"optimization" controllable by some variable, which we could then use
in the future as a "fire escape" if someone comes up with a use case
where the code you want to remove is indeed needed.

Alternatively, how about making the "Don't show key ranges if shadowed
by different commands" feature, which triggered this regression,
optional, by default off?  Then people who want it could be warned
that it might slow down describe-buffer-bindings, and will have to
decide whether they care enough about the speed to have the feature
turned on.

In any case, at least some of this explanation should be in comments
to the code, no matter whether we leave it alone or bypass it
conditionally.  If we introduce a variable to control this, some of
this should be in the doc string of that variable.

Thanks again for working on this, and sorry it took me so long to get
to review it.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45379; Package emacs. Full text available.

Message received at 45379 <at> debbugs.gnu.org:


Received: (at 45379) by debbugs.gnu.org; 6 May 2021 10:12:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 06 06:12:01 2021
Received: from localhost ([127.0.0.1]:37196 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1leaz8-0003xs-1W
	for submit <at> debbugs.gnu.org; Thu, 06 May 2021 06:12:01 -0400
Received: from eggs.gnu.org ([209.51.188.92]:43156)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1leaz6-0003xm-Eh
 for 45379 <at> debbugs.gnu.org; Thu, 06 May 2021 06:11:57 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:55178)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1leayz-0008Vl-Tl; Thu, 06 May 2021 06:11:49 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2731
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.86_2) (envelope-from <eliz@HIDDEN>)
 id 1leayy-0008Qr-8Y; Thu, 06 May 2021 06:11:49 -0400
Date: Thu, 06 May 2021 13:11:37 +0300
Message-Id: <83k0ocdvdy.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <CADwFkm=JH2KOEhSySifL6XYT5KdJYHROgb4c4oLMq54rMjgsHw@HIDDEN>
 (message from Stefan Kangas on Tue, 4 May 2021 18:31:10 -0500)
Subject: Re: bug#45379: 28.0.50;
 Degraded Performance of describe-buffer-bindings
References: <02f717c6-dc96-4ba0-9117-2ef079ac556f@HIDDEN>
 <CADwFkmn=GnQRNYbiA=zV8F1kPY+B5qHz4QhzvgkQMOia_x77Yw@HIDDEN>
 <CADwFkmkgYWQOzDP7WaYeyS5pS3ZA7iY4Fs-1F2Gymtata7A8nw@HIDDEN>
 <CADwFkm=JH2KOEhSySifL6XYT5KdJYHROgb4c4oLMq54rMjgsHw@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 45379
Cc: juri@HIDDEN, styang@HIDDEN, handa@HIDDEN, stephen.berman@HIDDEN,
 rudalics@HIDDEN, monnier@HIDDEN, 45379 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Stefan Kangas <stefan@HIDDEN>
> Date: Tue, 4 May 2021 18:31:10 -0500
> Cc: Juri Linkov <juri@HIDDEN>, martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, 
> 	45379 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>, 
> 	Stephen Berman <stephen.berman@HIDDEN>, Kenichi Handa <handa@HIDDEN>
> 
> I finally had time/energy to look into this again!  Sorry for taking
> more time than expected.

Thanks for your time and efforts.  I will review this as soon as I
have enough time to do so.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45379; Package emacs. Full text available.

Message received at 45379 <at> debbugs.gnu.org:


Received: (at 45379) by debbugs.gnu.org; 4 May 2021 23:31:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 04 19:31:20 2021
Received: from localhost ([127.0.0.1]:56060 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1le4Vc-0001RS-1L
	for submit <at> debbugs.gnu.org; Tue, 04 May 2021 19:31:20 -0400
Received: from mail-pf1-f174.google.com ([209.85.210.174]:36801)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1le4VZ-0001R7-57
 for 45379 <at> debbugs.gnu.org; Tue, 04 May 2021 19:31:18 -0400
Received: by mail-pf1-f174.google.com with SMTP id p4so658395pfo.3
 for <45379 <at> debbugs.gnu.org>; Tue, 04 May 2021 16:31:17 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:in-reply-to:references:mime-version:date
 :message-id:subject:to:cc:content-transfer-encoding;
 bh=h/t//vg7uIczPpI8PkJC3nw6QCgF33tjnEHC9bu9gOM=;
 b=kuXwBVQVS/5GjWCeVo/1NdUMQeBfTh1RM7RX69h+IQKe+O+sLlIpXBxy6vRV0zJEEP
 n/1Si2y0ddDRjptKn77LQYtSA9dNOL5/sqITMVQ/CKhHVmEHt/LqLjJ4lSLsYsnMnU/P
 jZP0HqeMaW88Ha2rdqKraTomZC0najyPL0ya5qk2g02Lq31zhDnMeq/R+e9/PALtv0bz
 Vrqp4qswsT/+qN/s4Uxcgc+Xmr5RtvyCmNaInGQm45I+9e+5mGevPwttJ4Ol6oYSYAoN
 jekBaaJ6uk2FQTeVF2X/P+wc/YzKwDzXERVtUJey/OI0HZV28tl50//BuNkqOU2Tuwef
 H7Tg==
X-Gm-Message-State: AOAM532aG248wKszG5nWr20KieLOYzfsRnyqj/vimy3lwJGiHhifmiHl
 PEgR6oUAK4deSMOfxtbFe+1JUoAcc5JDpa8otHY=
X-Google-Smtp-Source: ABdhPJzwQlPLgcn45x3BE5WVF5DP9ujA1Gyi50h90fUyurUiMEis0fMcu0FITJ5STEguFqR5C5zL1BzhRtq1on38Bbc=
X-Received: by 2002:a17:90a:b38a:: with SMTP id
 e10mr30938628pjr.175.1620171071301; 
 Tue, 04 May 2021 16:31:11 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Tue, 4 May 2021 18:31:10 -0500
From: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <CADwFkmkgYWQOzDP7WaYeyS5pS3ZA7iY4Fs-1F2Gymtata7A8nw@HIDDEN>
References: <02f717c6-dc96-4ba0-9117-2ef079ac556f@HIDDEN>
 <CADwFkmn=GnQRNYbiA=zV8F1kPY+B5qHz4QhzvgkQMOia_x77Yw@HIDDEN>
 <CADwFkmkgYWQOzDP7WaYeyS5pS3ZA7iY4Fs-1F2Gymtata7A8nw@HIDDEN>
MIME-Version: 1.0
Date: Tue, 4 May 2021 18:31:10 -0500
Message-ID: <CADwFkm=JH2KOEhSySifL6XYT5KdJYHROgb4c4oLMq54rMjgsHw@HIDDEN>
Subject: Re: bug#45379: 28.0.50;
 Degraded Performance of describe-buffer-bindings
To: Sheng Yang <styang@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 45379
Cc: Stephen Berman <stephen.berman@HIDDEN>, Kenichi Handa <handa@HIDDEN>,
 Juri Linkov <juri@HIDDEN>, martin rudalics <rudalics@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 45379 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

I finally had time/energy to look into this again!  Sorry for taking
more time than expected.

handa <handa@HIDDEN> writes:

> In article <838s65ktvk.fsf@HIDDEN>, Eli Zaretskii <eliz@HIDDEN> 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.

Yes, this is all correct.

> 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))

(This is explained below.)

Eli Zaretskii <eliz@HIDDEN> writes:

> I'm not sure I understand the reasons for each of the changes here.
> char-tables are a tricky data structure, so I'd like to make sure this
> change doesn't make our code subtly incorrect.
>
> So could you please walk us through the proposed changes, adding
> explanations for each part as you go?

This code is a bit complicated, so please bare with me if I am going
into too much detail.  BTW, note that I have also carried out a lot of
testing to see that my change does the same thing as before, only faster
(unfortunately it has been harder to come up with useful automated tests
beyond the ones we already have).

First, it might help to think of this as consisting of two parts:

1. A cleanup of the boundary condition check.  It is simply to make this
   code a bit more clear and easier to follow.

2. The actual bug fix for the performance bug.

I put a divider in between these two parts to make things hopefully a
bit more clear.

Stefan Kangas <stefan@HIDDEN> writes:

> From f95c75f1112c1aae0bd06a6753b60ce8a591d6e2 Mon Sep 17 00:00:00 2001
> From: Stefan Kangas <stefan@HIDDEN>
> Date: Sat, 6 Mar 2021 05:32:32 +0100
> Subject: [PATCH] Fix describe-buffer-bindings performance regression
>
> * src/keymap.c (describe_vector): Improve char-table performance by
> removing an unnecessary loop.  (Bug#45379)
> (syms_of_keymap) <Qself_insert_command>: New DEFSYM.
> ---
>  src/keymap.c | 47 +++++++++++++++++++----------------------------
>  1 file changed, 19 insertions(+), 28 deletions(-)
>
> diff --git a/src/keymap.c b/src/keymap.c
> index 782931fadf..c70df98a6e 100644
> --- a/src/keymap.c
> +++ b/src/keymap.c
> @@ -2920,7 +2920,7 @@ describe_vector (Lisp_Object vector, Lisp_Object pr=
efix, Lisp_Object args,
>    Lisp_Object suppress =3D Qnil;
>    bool first =3D true;
>    /* Range of elements to be handled.  */
> -  int from, to, stop;
> +  int to, stop;
>
>    if (!keymap_p)
>      {
> @@ -2940,32 +2940,33 @@ describe_vector (Lisp_Object vector, Lisp_Object =
prefix, Lisp_Object args,
>    if (partial)
>      suppress =3D intern ("suppress-keymap");
>
> -  from =3D 0;

The "from" variable is initialized to 0 below and is redundant.  So it
is replaced with the constant 0, which I think makes the intention of
this code more clear.  IOW, this is just a cleanup.

> +  /* If VECTOR is a char-table, we had better put a boundary
> +     between normal characters (-#x3FFF7F) and 8-bit characters
> +     (#x3FFF80-).  */
>    if (CHAR_TABLE_P (vector))
>      stop =3D MAX_5_BYTE_CHAR + 1, to =3D MAX_CHAR + 1;
>    else
>      stop =3D to =3D ASIZE (vector);

The above puts a "boundary" that we need to handle below by stopping
(skipping to the next range) when we reach "stop".

We must end the loop altogether only when we reach "to".

Note that for char tables stop !=3D to, otherwise stop =3D=3D to

>
> -  for (int i =3D from; ; i++)
> +  for (int i =3D 0; i < to; i++)
>      {

Here we stop when we reach "to", which is what we intend.

The "from" mentioned above is also here replaced with constant 0.

>        bool this_shadowed =3D false;
>        Lisp_Object shadowed_by =3D Qnil;
> -      int range_beg, range_end;
> +      int range_beg;

[range_end is now unused and so removed.]

>        Lisp_Object val, tem2;
>
>        maybe_quit ();
>
> -      if (i =3D=3D stop)
> -	{
> -	  if (i =3D=3D to)
> -	    break;

This is a bit complicated to follow, so I have cleaned it up.

What happens here is that we exit the loop if "i =3D=3D to".

The rest is to handle the above "boundary".  We have two cases:

1. If this is not a char table:

    i =3D=3D stop  implies that  i =3D=3D to

   (The loop will always end here.)

2. If this is a char table:

   i =3D=3D stop   does not imply that   i =3D=3D to

  a) The loop will end if

   i =3D=3D stop  =E2=88=A7  i =3D=3D to

   (This can never be the case the first time we reach this, see above.
   We must first have reached the 2b) immediately below in a previous
   iteration.)

> -	  stop =3D to;
> -	}
> -

  b) Otherwise, if "i =3D=3D stop =E2=88=A7 i !=3D to", we set "stop =3D to=
"

   (Again, only when this has happened can we reach 2a.)

But this is all removed, so the 2b) action is moved here:

>        int starting_i =3D i;
>
>        if (CHAR_TABLE_P (vector))
>  	{
> +	  /* Take care of the boundary.  */
> +	  if (i =3D=3D stop)
> +	    stop =3D to;

IOW, here "i !=3D to", but "i =3D=3D stop" so we set "stop =3D to".  Just a=
s
before.

Thus, the boundary condition is handled.

=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=
=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=93 End part 1, performance bug fix =
follows:

> +	  /* Find the first element between i and stop - 1.  Put its
> +	     index in i.  */
>  	  range_beg =3D i;
>  	  i =3D stop - 1;
>  	  val =3D char_table_ref_and_range (vector, range_beg, &range_beg, &i);
                ^^^^^^^^^^^^^^^^^^^^^^^^

First call to "char_table_ref_and_range".

This puts the correct values in the "range_beg" variables and "i", where
"range_beg" is the start of the range and "i" is the last item in the
range that has the same value.

This is followed by:

>	}
>      else
>	val =3D AREF (vector, i);
>      Lisp_Object definition =3D get_keyelt (val, 0);
>
>      if (NILP (definition)) continue;

IOW, we skip it if it is not defined.

This is important to see why we can remove the next part.

> @@ -3024,21 +3025,8 @@ describe_vector (Lisp_Object vector, Lisp_Object p=
refix, Lisp_Object args,
>        insert1 (Fkey_description (kludge, prefix));
>
>        /* Find all consecutive characters or rows that have the same
> -	 definition.  But, if VECTOR is a char-table, we had better
> -	 put a boundary between normal characters (-#x3FFF7F) and
> -	 8-bit characters (#x3FFF80-).  */
> -      if (CHAR_TABLE_P (vector))
> -	{
> -	  while (i + 1 < stop
> -		 && (range_beg =3D i + 1, range_end =3D stop - 1,
> -		   val =3D char_table_ref_and_range (vector, range_beg,
> -						   &range_beg, &range_end),
                         ^^^^^^^^^^^^^^^^^^^^^^^^

This second call simply tries to call up a *second* range within the
same iteration.  This is to "put a boundary" (commit bed6185fecbb), but
it is crucial to note this is _already handled_ above.

This is therefore superfluous, as we can see from what happens next:

> -		   tem2 =3D get_keyelt (val, 0),
> -		   !NILP (tem2))
> -		 && !NILP (Fequal (tem2, definition)))
> -	    i =3D range_end;

This is all just to continue advancing down the char table until we find
something.  Again, note that above we already do exactly the same thing,
so doing it here as well is superfluous.

I.e. compare these statements to the lines above, specifically:

    Lisp_Object definition =3D get_keyelt (val, 0);
    if (NILP (definition)) continue;

Pay particular attention to the variables i, range_beg, and range_end.

> -	}
> -      else
> +	 definition.  */
> +      if (!CHAR_TABLE_P (vector))
>  	while (i + 1 < stop
>  	       && (tem2 =3D get_keyelt (AREF (vector, i + 1), 0),
>  		   !NILP (tem2))

(Note that there is no change if this is not a char-table.)

> @@ -3047,10 +3035,12 @@ describe_vector (Lisp_Object vector, Lisp_Object =
prefix, Lisp_Object args,
>
>        /* Make sure found consecutive keys are either not shadowed or,
>  	 if they are, that they are shadowed by the same command.  */
> -      if (CHAR_TABLE_P (vector) && i !=3D starting_i)
> +      if (CHAR_TABLE_P (vector) && i !=3D starting_i
> +	  /* Ignore `self-insert-command' for performance.  */
> +	  && !EQ (definition, Qself_insert_command))
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To see if the shadowing is the same for an entire range, we need to run
shadow_lookup() for *once for each character* in that range to see if
they are shadowed.  This is expensive.

One observation is that we often have *very long* ranges of characters
where the value is "self-insert-command", as in:

    (lookup-key global-map "=E6=96=87")

This is because a char-table will cover the range of all valid character
codes.  [Note again that we use a char-table only if the keymap is
defined with `make-keymap' (as opposed to `make-sparse-keymap', which is
just a list)]

Let's just assume that it is unlikely that there is any shadowing going
on for all of these self-inserting keys.  If there is shadowing going
on, we are probably not looking at a keymap where we have the default
value is set to self-insert-command.

So we basically say here: let's just not care about
`self-insert-command' and skip the check.  Yes, we will in theory not
get a perfect result, as there will be some cases where we miss the
shadowing.  OTOH, we are sure to have something that is not very slow.
(And in any case, I don't know of any examples where this will fail, and
if they exist we will in any case already be doing better than Emacs 27,
as this entire check is new in Emacs 28.)

>  	{
>  	  Lisp_Object key =3D make_nil_vector (1);
> -	  for (int j =3D starting_i + 1; j <=3D i; j++)
> +	  for (int j =3D range_beg + 1; j <=3D i; j++)
                       ^^^^^^^^^^

("range_beg" is the start of the actual range here, previously it was
starting_i due to the second call to char_table_ref_and_range.)

>  	    {
>  	      ASET (key, 0, make_fixnum (j));
>  	      Lisp_Object tem =3D shadow_lookup (shadow, key, Qt, 0);
> @@ -3109,6 +3099,7 @@ syms_of_keymap (void)
>    DEFSYM (Qdescribe_map_tree, "describe-map-tree");
>
>    DEFSYM (Qkeymap_canonicalize, "keymap-canonicalize");
> +  DEFSYM (Qself_insert_command, "self-insert-command");
>
>    /* Now we are ready to set up this property, so we can
>       create char tables.  */
> --
> 2.30.1

Phew!




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45379; Package emacs. Full text available.

Message received at 45379 <at> debbugs.gnu.org:


Received: (at 45379) by debbugs.gnu.org; 14 Apr 2021 03:06:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 13 23:06:59 2021
Received: from localhost ([127.0.0.1]:33067 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lWVrn-00063v-3d
	for submit <at> debbugs.gnu.org; Tue, 13 Apr 2021 23:06:59 -0400
Received: from out4-smtp.messagingengine.com ([66.111.4.28]:34255)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <styang@HIDDEN>) id 1lWVrk-00063i-Qw
 for 45379 <at> debbugs.gnu.org; Tue, 13 Apr 2021 23:06:58 -0400
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)
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: <xms:Slx2YD-yrE3r00sZ2rVzsbslQ58tWCX4h_LLxcclRnc5jog-65MrDA>
 <xme:Slx2YPuatnYaqohDHCWfnIhhQoqoqpU36cu7ty57UElGGzmWl3y9NA2KvGOU9kYZn
 Kb6EQXlKEhq6buKcsI>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudeltddgieeiucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepofgfggfkjghffffhvffutgesrgdtreerreerjeenucfhrhhomhepfdfuhhgv
 nhhgucgjrghnghdfuceoshhthigrnhhgsehfrghsthhmrghilhdrtghomheqnecuggftrf
 grthhtvghrnhepheeluedtudffffegffeileettedvudeihefhvefgvdeivddttdeifeei
 geegveejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh
 epshhthigrnhhgsehfrghsthhmrghilhdrtghomh
X-ME-Proxy: <xmx:Slx2YBDXwRvtxP1ve9UbVGlhTVb6dPbUc8jegtRQIGVo-ME1UMT5Eg>
 <xmx:Slx2YPddZGAnWzynPCygoyDDFGIxtl32IxWquro3eUH4bOTZ_2XdMg>
 <xmx:Slx2YIOwH0X168l4tW_tzLH8x7H2eD0Fso4T3EVkGP2JlM2IsPL1Jw>
 <xmx:S1x2YFqZWTIYCUsmWoG36LE_Osg_roRKvDJ1dhQSTX7kio2ydb1vJQ>
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
User-Agent: Cyrus-JMAP/3.5.0-alpha0-273-g8500d2492d-fm-20210323.002-g8500d249
Mime-Version: 1.0
Message-Id: <c9976b13-ef8d-49b3-b862-6c63e9c6f22d@HIDDEN>
In-Reply-To: <87v996rqm7.fsf@HIDDEN>
References: <87v996rqm7.fsf@HIDDEN>
Date: Tue, 13 Apr 2021 22:06:29 -0500
From: "Sheng Yang" <styang@HIDDEN>
To: handa <handa@HIDDEN>, "Eli Zaretskii" <eliz@HIDDEN>
Subject: =?UTF-8?Q?Re:_bug#45379:_28.0.50;
 _Degraded_Performance_of_describe-buffe?= =?UTF-8?Q?r-bindings?=
Content-Type: multipart/alternative; boundary=b6b26e12b04b420c95ab9adc87599d43
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 45379
Cc: 45379 <at> debbugs.gnu.org, Stephen Berman <stephen.berman@HIDDEN>,
 Stefan Kangas <stefan@HIDDEN>, Stefan Monnier <monnier@HIDDEN>,
 Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--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@HIDDEN <mailto:838s65ktvk.fsf%40gnu.org>>,=
 Eli Zaretskii <eliz@HIDDEN <mailto:eliz%40gnu.org>> 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@HIDDEN <mailto:handa%40gnu.org>
>=20

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


--b6b26e12b04b420c95ab9adc87599d43
Content-Type: text/html;charset=utf-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html><html><head><title></title><style type=3D"text/css">p.Mso=
Normal,p.MsoNoSpacing{margin:0}</style></head><body><div>Any update on t=
his? Having been using the patch for a few weeks now, seems fine for me.=
<br></div><div><br></div><div>On Thu, Apr 1, 2021, at 10:06, handa wrote=
:<br></div><blockquote type=3D"cite" id=3D"qt" style=3D""><div>In articl=
e &lt;<a href=3D"mailto:838s65ktvk.fsf%40gnu.org">838s65ktvk.fsf@HIDDEN=
</a>&gt;, Eli Zaretskii &lt;<a href=3D"mailto:eliz%40gnu.org">eliz@HIDDEN=
rg</a>&gt; writes:<br></div><div><br></div><div>&gt; &gt; &gt; Is the pa=
tch for the above improvement the one included in the file<br></div><div=
>&gt; &gt; &gt; 0001-Fix-describe-buffer-bindings-performance-regression=
.patch?<br></div><div>&gt; &gt;&nbsp;<br></div><div>&gt; &gt; Yes, it is=
.<br></div><div><br></div><div>It seems that the main intention of that =
patch is to avoid unnecessary<br></div><div>call of char_table_ref_and_r=
ange introduced by the commit below:<br></div><div><br></div><div>&gt; &=
gt;&nbsp;&nbsp;&nbsp;&nbsp; Don't show key ranges if shadowed by differe=
nt commands<br></div><div>&gt; &gt;&nbsp;<br></div><div>&gt; &gt;&nbsp;&=
nbsp;&nbsp;&nbsp; * src/keymap.c (describe_vector): Make sure found cons=
ecutive keys<br></div><div>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; are either =
not shadowed or, if they are, that they are shadowed by<br></div><div>&g=
t; &gt;&nbsp;&nbsp;&nbsp;&nbsp; the same command.&nbsp; (Bug#9293)<br></=
div><div><br></div><div>In describe_vector, if VECTOR is a char-table, c=
har_table_ref_and_range<br></div><div>is already called at the fairly be=
ginning of the main loop.&nbsp; So, we do<br></div><div>not have to call=
 it again, and thus, I think the patch is doing the<br></div><div>correc=
t thing.<br></div><div><br></div><div>But, I don't know whether the foll=
owing part in the patch is correct or<br></div><div>not.<br></div><div><=
br></div><div>+	&nbsp; /* Ignore `self-insert-command' for performance.&=
nbsp; */<br></div><div>+	&nbsp; &amp;&amp; !EQ (definition, Qself_insert=
_command))<br></div><div><br></div><div>---<br></div><div>K. Handa<br></=
div><div><a href=3D"mailto:handa%40gnu.org">handa@HIDDEN</a><br></div><=
div><br></div></blockquote><div><br></div><div id=3D"sig97546008"><div c=
lass=3D"signature">Sheng Yang(=E6=9D=A8=E5=9C=A3), PhD<br></div><div cla=
ss=3D"signature">Computer Science Department<br></div><div class=3D"sign=
ature">University of Maryland, College Park<br></div><div class=3D"signa=
ture">E-mail: <a href=3D"mailto:styang@HIDDEN">styang@HIDDEN=
</a><br></div><div class=3D"signature">E-mail (old but still used): <a h=
ref=3D"mailto:yangsheng6810@HIDDEN">yangsheng6810@HIDDEN</a><br></=
div><div class=3D"signature"><br></div></div><div><br></div></body></htm=
l>
--b6b26e12b04b420c95ab9adc87599d43--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45379; Package emacs. Full text available.
Merged 45379 47494 47565. Request was from Eli Zaretskii <eliz@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 45379 <at> debbugs.gnu.org:


Received: (at 45379) by debbugs.gnu.org; 1 Apr 2021 15:06:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 01 11:06:58 2021
Received: from localhost ([127.0.0.1]:58273 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lRyuP-0002i5-Qi
	for submit <at> debbugs.gnu.org; Thu, 01 Apr 2021 11:06:58 -0400
Received: from eggs.gnu.org ([209.51.188.92]:48434)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <handa@HIDDEN>) id 1lRyuO-0002hr-FN
 for 45379 <at> debbugs.gnu.org; Thu, 01 Apr 2021 11:06:56 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:56249)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <handa@HIDDEN>)
 id 1lRyuH-00053j-DX; Thu, 01 Apr 2021 11:06:49 -0400
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 <handa@HIDDEN>)
 id 1lRyuF-0001N4-2A; Thu, 01 Apr 2021 11:06:48 -0400
Received: from handa by shatin with local (Exim 4.93)
 (envelope-from <handa@HIDDEN>)
 id 1lRyu9-0008Lx-1D; Fri, 02 Apr 2021 00:06:41 +0900
From: handa <handa@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#45379: 28.0.50; Degraded Performance of
 describe-buffer-bindings
In-Reply-To: <838s65ktvk.fsf@HIDDEN> (message from Eli Zaretskii on Tue, 30
 Mar 2021 10:01:19 +0300)
Date: Fri, 02 Apr 2021 00:06:40 +0900
Message-ID: <87v996rqm7.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 45379
Cc: stephen.berman@HIDDEN, stefan@HIDDEN, juri@HIDDEN,
 styang@HIDDEN, monnier@HIDDEN, 45379 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

In article <838s65ktvk.fsf@HIDDEN>, Eli Zaretskii <eliz@HIDDEN> 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@HIDDEN




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45379; Package emacs. Full text available.

Message received at 45379 <at> debbugs.gnu.org:


Received: (at 45379) by debbugs.gnu.org; 30 Mar 2021 07:01:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 30 03:01:24 2021
Received: from localhost ([127.0.0.1]:50231 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lR8NL-0000wq-89
	for submit <at> debbugs.gnu.org; Tue, 30 Mar 2021 03:01:24 -0400
Received: from eggs.gnu.org ([209.51.188.92]:36880)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1lR8NI-0000qf-Ph
 for 45379 <at> debbugs.gnu.org; Tue, 30 Mar 2021 03:01:17 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:60840)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1lR8NB-0004jw-VS; Tue, 30 Mar 2021 03:01:09 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1160
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1lR8NA-0008Ob-24; Tue, 30 Mar 2021 03:01:08 -0400
Date: Tue, 30 Mar 2021 10:01:19 +0300
Message-Id: <838s65ktvk.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Kenichi Handa <handa@HIDDEN>
In-Reply-To: <83r1krtrpt.fsf@HIDDEN> (message from Eli Zaretskii on Sun, 07
 Mar 2021 08:15:10 +0200)
Subject: Re: bug#45379: 28.0.50;
 Degraded Performance of describe-buffer-bindings
References: <874khnzqls.fsf@HIDDEN> <83r1krtrpt.fsf@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 45379
Cc: stephen.berman@HIDDEN, stefan@HIDDEN, juri@HIDDEN, handa@HIDDEN,
 styang@HIDDEN, monnier@HIDDEN, 45379 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Ping!  Kenichi, could you please help us with this issue?

> Date: Sun, 07 Mar 2021 08:15:10 +0200
> From: Eli Zaretskii <eliz@HIDDEN>
> Cc: stephen.berman@HIDDEN, 45379 <at> debbugs.gnu.org, stefan@HIDDEN,
>  juri@HIDDEN, handa@HIDDEN, monnier@HIDDEN, styang@HIDDEN
> 
> > From: handa <handa@HIDDEN>
> > Cc: stefan@HIDDEN, styang@HIDDEN, juri@HIDDEN, rudalics@HIDDEN,
> > 	45379 <at> debbugs.gnu.org, monnier@HIDDEN,
> > 	stephen.berman@HIDDEN, handa@HIDDEN
> > Date: Sun, 07 Mar 2021 10:42:39 +0900
> > 
> > In article <83v9a4wve3.fsf@HIDDEN>, Eli Zaretskii <eliz@HIDDEN> writes:
> > 
> > > > From: Stefan Kangas <stefan@HIDDEN>
> > > > Date: Fri, 5 Mar 2021 20:44:33 -0800
> > > > Cc: Juri Linkov <juri@HIDDEN>, martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, 
> > > > 	45379 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>, 
> > > > 	Stephen Berman <stephen.berman@HIDDEN>
> > > > 
> > > > It turns out that we were doing unnecessary looping due to the above
> > > > mentioned commit.
> > 
> > Could you show me what is "the above mentioned commit"?
> 
> This one, I guess:
> 
> > commit a6490343366f2b2331a91dcb693effb3a9dd78f5
> > Author:     Stefan Kangas <stefan@HIDDEN>
> > AuthorDate: Fri Nov 13 15:28:29 2020 +0100
> > Commit:     Stefan Kangas <stefan@HIDDEN>
> > CommitDate: Sun Nov 22 02:45:03 2020 +0100
> > 
> >     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)
> >     * test/src/keymap-tests.el
> >     (help--describe-vector/bug-9293-one-shadowed-in-range): New test.
> 
> > > >  While working on this, I also found that we can get
> > > > rid of an unnecessary call to char_table_ref_and_range, which should
> > > > make this function run even faster.
> > 
> > Is the patch for the above improvement the one included in the file
> > 0001-Fix-describe-buffer-bindings-performance-regression.patch?
> 
> Yes, it is.
> 
> > > > I'm also copying in Kenichi Handa, who was the last to touch this code.
> > > > Handa-san, please let us know if you have any comments on this patch.
> > > > Thanks in advance.
> > 
> > > AFAICT, you didn't CC Kenichi; I have now added him to the discussion.
> > 
> > It was more than 10 years ago that I last read keymap.c, and since then,
> > the code has been changed a lot.  It will take some time to understand
> > the latest code.
> 
> Thanks in advance.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45379; Package emacs. Full text available.
Merged 45379 47494. Request was from Eli Zaretskii <eliz@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 45379 <at> debbugs.gnu.org:


Received: (at 45379) by debbugs.gnu.org; 7 Mar 2021 08:38:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 07 03:38:47 2021
Received: from localhost ([127.0.0.1]:38875 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lIovx-0004uR-MT
	for submit <at> debbugs.gnu.org; Sun, 07 Mar 2021 03:38:47 -0500
Received: from eggs.gnu.org ([209.51.188.92]:52520)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1lIovu-0004uD-3p
 for 45379 <at> debbugs.gnu.org; Sun, 07 Mar 2021 03:38:40 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:54542)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1lIovl-0004bh-Uh; Sun, 07 Mar 2021 03:38:29 -0500
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4135
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1lIovl-0003sW-Cm; Sun, 07 Mar 2021 03:38:29 -0500
Date: Sun, 07 Mar 2021 10:38:19 +0200
Message-Id: <83ft17tl38.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <CADwFkmnX56wcVW=y1a3NZv0AqXraRs_3bdd44nEVDiaXdm5Fsg@HIDDEN>
 (message from Stefan Kangas on Sun, 7 Mar 2021 03:12:17 -0500)
Subject: Re: bug#45379: 28.0.50;
 Degraded Performance of describe-buffer-bindings
References: <02f717c6-dc96-4ba0-9117-2ef079ac556f@HIDDEN>
 <CADwFkmn=GnQRNYbiA=zV8F1kPY+B5qHz4QhzvgkQMOia_x77Yw@HIDDEN>
 <CADwFkmkgYWQOzDP7WaYeyS5pS3ZA7iY4Fs-1F2Gymtata7A8nw@HIDDEN>
 <83v9a4wve3.fsf@HIDDEN>
 <CADwFkmnX56wcVW=y1a3NZv0AqXraRs_3bdd44nEVDiaXdm5Fsg@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 45379
Cc: styang@HIDDEN, rudalics@HIDDEN, stephen.berman@HIDDEN,
 juri@HIDDEN, handa@HIDDEN, monnier@HIDDEN,
 45379 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: Stefan Kangas <stefan@HIDDEN>
> Date: Sun, 7 Mar 2021 03:12:17 -0500
> Cc: styang@HIDDEN, juri@HIDDEN, rudalics@HIDDEN, 
> 	45379 <at> debbugs.gnu.org, monnier@HIDDEN, stephen.berman@HIDDEN
> 
> > So could you please walk us through the proposed changes, adding
> > explanations for each part as you go?
> 
> Yes.  Please allow for at least a couple of days to write this up.

Sure.  There's no rush, please take your time.

> > (And what do char-tables have to do with describing key bindings,
> > btw?)
> 
> Full keymaps are char-tables, while sparse keymaps are just lists.
> 
> The call stack looks like this:
> 
> Fdescribe_buffer_bindings [keymap.c]
> -> describe-map-tree      [help.el]
> -> describe-map
> -> Fhelp__describe_vector [keymap.c]
> -> describe_vector

Got it, thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45379; Package emacs. Full text available.

Message received at 45379 <at> debbugs.gnu.org:


Received: (at 45379) by debbugs.gnu.org; 7 Mar 2021 08:12:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 07 03:12:25 2021
Received: from localhost ([127.0.0.1]:38854 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lIoWX-0004H4-7K
	for submit <at> debbugs.gnu.org; Sun, 07 Mar 2021 03:12:25 -0500
Received: from mail-pf1-f172.google.com ([209.85.210.172]:44084)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1lIoWW-0004Gr-9g
 for 45379 <at> debbugs.gnu.org; Sun, 07 Mar 2021 03:12:24 -0500
Received: by mail-pf1-f172.google.com with SMTP id t29so5057013pfg.11
 for <45379 <at> debbugs.gnu.org>; Sun, 07 Mar 2021 00:12:24 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:in-reply-to:references:mime-version:date
 :message-id:subject:to:cc;
 bh=bTYLzNNnDDJOSf2N3DR9GIASH7LOJra6HpjH7NkSPdo=;
 b=TUX1gH46EHqrR+4gq4MKNxiffol9oKrWHvaSYG81p6/wx6n0vuJvDUBMLS9s/OXGE9
 HSQV7cd3hteJBJ666Ur0S+RcNr1XJZv0MNY7R/JvxyrrkKZpTKEZRAPl1D2usuBeenWM
 /DLoMxd1injlHlUTdDhMstRPoIf81W03NHJvJKRuh2v2VaCTBJIwiqL1ncw7yk2+V2py
 i+i4iCB53ZhflWOM1oNCVohY+mWFT76jKJVcIVZwWn/bnyXp3pHqTZ7t6qUgrjDgfrDm
 tNMjZwaiF2oCWH96JJzqoeY73cPMGqwMn8DXYrgfUoj1KSaPQXINxpB48JnL6qkEo2f6
 iBCQ==
X-Gm-Message-State: AOAM531J4OWPHOpoY7592ziP28i+1HBWrnjQnmRtlgFMr6SkfCL6hjXr
 6qet71bh4xtIvhrlBTNtx22NHOEkhFC4EgK7TdU=
X-Google-Smtp-Source: ABdhPJycdIlS2fOcRG5XTYBr7lIglfpjHk+RuU96IPRpBehRR4LI2Fe42Krm2GeZLWI25YEpa8rKPULrNdhaVp/H0jE=
X-Received: by 2002:a63:6206:: with SMTP id w6mr13712545pgb.363.1615104738570; 
 Sun, 07 Mar 2021 00:12:18 -0800 (PST)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Sun, 7 Mar 2021 03:12:17 -0500
From: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <83v9a4wve3.fsf@HIDDEN>
References: <02f717c6-dc96-4ba0-9117-2ef079ac556f@HIDDEN>
 <CADwFkmn=GnQRNYbiA=zV8F1kPY+B5qHz4QhzvgkQMOia_x77Yw@HIDDEN>
 <CADwFkmkgYWQOzDP7WaYeyS5pS3ZA7iY4Fs-1F2Gymtata7A8nw@HIDDEN>
 <83v9a4wve3.fsf@HIDDEN>
MIME-Version: 1.0
Date: Sun, 7 Mar 2021 03:12:17 -0500
Message-ID: <CADwFkmnX56wcVW=y1a3NZv0AqXraRs_3bdd44nEVDiaXdm5Fsg@HIDDEN>
Subject: Re: bug#45379: 28.0.50;
 Degraded Performance of describe-buffer-bindings
To: Eli Zaretskii <eliz@HIDDEN>, Kenichi Handa <handa@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 45379
Cc: juri@HIDDEN, styang@HIDDEN, stephen.berman@HIDDEN,
 rudalics@HIDDEN, monnier@HIDDEN, 45379 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

Eli Zaretskii <eliz@HIDDEN> writes:

>> It turns out that we were doing unnecessary looping due to the above
>> mentioned commit.  While working on this, I also found that we can get
>> rid of an unnecessary call to char_table_ref_and_range, which should
>> make this function run even faster.
>
> I'm not sure I understand the reasons for each of the changes here.
> char-tables are a tricky data structure, so I'd like to make sure this
> change doesn't make our code subtly incorrect.

Thanks.

I have been struggling to come up with good unit tests, so any ideas
about that would also be very welcome.

> So could you please walk us through the proposed changes, adding
> explanations for each part as you go?

Yes.  Please allow for at least a couple of days to write this up.

> (And what do char-tables have to do with describing key bindings,
> btw?)

Full keymaps are char-tables, while sparse keymaps are just lists.

The call stack looks like this:

Fdescribe_buffer_bindings [keymap.c]
-> describe-map-tree      [help.el]
-> describe-map
-> Fhelp__describe_vector [keymap.c]
-> describe_vector




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45379; Package emacs. Full text available.

Message received at 45379 <at> debbugs.gnu.org:


Received: (at 45379) by debbugs.gnu.org; 7 Mar 2021 06:15:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 07 01:15:35 2021
Received: from localhost ([127.0.0.1]:38793 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lImhO-00019t-51
	for submit <at> debbugs.gnu.org; Sun, 07 Mar 2021 01:15:35 -0500
Received: from eggs.gnu.org ([209.51.188.92]:38176)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1lImhM-00019h-Nf
 for 45379 <at> debbugs.gnu.org; Sun, 07 Mar 2021 01:15:29 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:53660)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1lImhF-0005qW-97; Sun, 07 Mar 2021 01:15:21 -0500
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3268
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1lImhE-00016v-Cx; Sun, 07 Mar 2021 01:15:20 -0500
Date: Sun, 07 Mar 2021 08:15:10 +0200
Message-Id: <83r1krtrpt.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: handa <handa@HIDDEN>
In-Reply-To: <874khnzqls.fsf@HIDDEN> (message from handa on Sun, 07 Mar 2021
 10:42:39 +0900)
Subject: Re: bug#45379: 28.0.50; Degraded Performance of
 describe-buffer-bindings
References: <874khnzqls.fsf@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 45379
Cc: handa@HIDDEN, styang@HIDDEN, stephen.berman@HIDDEN,
 stefan@HIDDEN, juri@HIDDEN, rudalics@HIDDEN, monnier@HIDDEN,
 45379 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: handa <handa@HIDDEN>
> Cc: stefan@HIDDEN, styang@HIDDEN, juri@HIDDEN, rudalics@HIDDEN,
> 	45379 <at> debbugs.gnu.org, monnier@HIDDEN,
> 	stephen.berman@HIDDEN, handa@HIDDEN
> Date: Sun, 07 Mar 2021 10:42:39 +0900
> 
> In article <83v9a4wve3.fsf@HIDDEN>, Eli Zaretskii <eliz@HIDDEN> writes:
> 
> > > From: Stefan Kangas <stefan@HIDDEN>
> > > Date: Fri, 5 Mar 2021 20:44:33 -0800
> > > Cc: Juri Linkov <juri@HIDDEN>, martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, 
> > > 	45379 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>, 
> > > 	Stephen Berman <stephen.berman@HIDDEN>
> > > 
> > > It turns out that we were doing unnecessary looping due to the above
> > > mentioned commit.
> 
> Could you show me what is "the above mentioned commit"?

This one, I guess:

> commit a6490343366f2b2331a91dcb693effb3a9dd78f5
> Author:     Stefan Kangas <stefan@HIDDEN>
> AuthorDate: Fri Nov 13 15:28:29 2020 +0100
> Commit:     Stefan Kangas <stefan@HIDDEN>
> CommitDate: Sun Nov 22 02:45:03 2020 +0100
> 
>     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)
>     * test/src/keymap-tests.el
>     (help--describe-vector/bug-9293-one-shadowed-in-range): New test.

> > >  While working on this, I also found that we can get
> > > rid of an unnecessary call to char_table_ref_and_range, which should
> > > make this function run even faster.
> 
> Is the patch for the above improvement the one included in the file
> 0001-Fix-describe-buffer-bindings-performance-regression.patch?

Yes, it is.

> > > I'm also copying in Kenichi Handa, who was the last to touch this code.
> > > Handa-san, please let us know if you have any comments on this patch.
> > > Thanks in advance.
> 
> > AFAICT, you didn't CC Kenichi; I have now added him to the discussion.
> 
> It was more than 10 years ago that I last read keymap.c, and since then,
> the code has been changed a lot.  It will take some time to understand
> the latest code.

Thanks in advance.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45379; Package emacs. Full text available.

Message received at 45379 <at> debbugs.gnu.org:


Received: (at 45379) by debbugs.gnu.org; 7 Mar 2021 01:43:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 06 20:43:02 2021
Received: from localhost ([127.0.0.1]:38649 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lIiRe-0002pR-90
	for submit <at> debbugs.gnu.org; Sat, 06 Mar 2021 20:43:02 -0500
Received: from eggs.gnu.org ([209.51.188.92]:37384)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <handa@HIDDEN>) id 1lIiRZ-0002pB-94
 for 45379 <at> debbugs.gnu.org; Sat, 06 Mar 2021 20:42:56 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49440)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <handa@HIDDEN>)
 id 1lIiRR-0005ot-Vn; Sat, 06 Mar 2021 20:42:46 -0500
Received: from fl1-60-236-248-230.iba.mesh.ad.jp ([60.236.248.230]:49514
 helo=shatin)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <handa@HIDDEN>)
 id 1lIiRQ-0000no-EE; Sat, 06 Mar 2021 20:42:45 -0500
Received: from handa by shatin with local (Exim 4.93)
 (envelope-from <handa@HIDDEN>)
 id 1lIiRL-0003E4-Aw; Sun, 07 Mar 2021 10:42:39 +0900
From: handa <handa@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#45379: 28.0.50; Degraded Performance of
 describe-buffer-bindings
In-Reply-To: <83v9a4wve3.fsf@HIDDEN> (message from Eli Zaretskii on Sat, 06
 Mar 2021 10:15:16 +0200)
Date: Sun, 07 Mar 2021 10:42:39 +0900
Message-ID: <874khnzqls.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 45379
Cc: handa@HIDDEN, styang@HIDDEN, stephen.berman@HIDDEN,
 stefan@HIDDEN, juri@HIDDEN, rudalics@HIDDEN, monnier@HIDDEN,
 45379 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

In article <83v9a4wve3.fsf@HIDDEN>, Eli Zaretskii <eliz@HIDDEN> writes:

> > From: Stefan Kangas <stefan@HIDDEN>
> > Date: Fri, 5 Mar 2021 20:44:33 -0800
> > Cc: Juri Linkov <juri@HIDDEN>, martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, 
> > 	45379 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>, 
> > 	Stephen Berman <stephen.berman@HIDDEN>
> > 
> > It turns out that we were doing unnecessary looping due to the above
> > mentioned commit.

Could you show me what is "the above mentioned commit"?

> >  While working on this, I also found that we can get
> > rid of an unnecessary call to char_table_ref_and_range, which should
> > make this function run even faster.

Is the patch for the above improvement the one included in the file
0001-Fix-describe-buffer-bindings-performance-regression.patch?

> > I'm also copying in Kenichi Handa, who was the last to touch this code.
> > Handa-san, please let us know if you have any comments on this patch.
> > Thanks in advance.

> AFAICT, you didn't CC Kenichi; I have now added him to the discussion.

It was more than 10 years ago that I last read keymap.c, and since then,
the code has been changed a lot.  It will take some time to understand
the latest code.

---
K. Handa
handa@HIDDEN




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45379; Package emacs. Full text available.

Message received at 45379 <at> debbugs.gnu.org:


Received: (at 45379) by debbugs.gnu.org; 6 Mar 2021 08:15:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 06 03:15:44 2021
Received: from localhost ([127.0.0.1]:35961 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lIS67-0005do-PT
	for submit <at> debbugs.gnu.org; Sat, 06 Mar 2021 03:15:44 -0500
Received: from eggs.gnu.org ([209.51.188.92]:60320)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1lIS65-0005da-JK
 for 45379 <at> debbugs.gnu.org; Sat, 06 Mar 2021 03:15:38 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:34947)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1lIS5z-00019C-CQ; Sat, 06 Mar 2021 03:15:31 -0500
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4618
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1lIS5y-0004tb-BN; Sat, 06 Mar 2021 03:15:30 -0500
Date: Sat, 06 Mar 2021 10:15:16 +0200
Message-Id: <83v9a4wve3.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Kangas <stefan@HIDDEN>, Kenichi Handa <handa@HIDDEN>
In-Reply-To: <CADwFkmkgYWQOzDP7WaYeyS5pS3ZA7iY4Fs-1F2Gymtata7A8nw@HIDDEN>
 (message from Stefan Kangas on Fri, 5 Mar 2021 20:44:33 -0800)
Subject: Re: bug#45379: 28.0.50;
 Degraded Performance of describe-buffer-bindings
References: <02f717c6-dc96-4ba0-9117-2ef079ac556f@HIDDEN>
 <CADwFkmn=GnQRNYbiA=zV8F1kPY+B5qHz4QhzvgkQMOia_x77Yw@HIDDEN>
 <CADwFkmkgYWQOzDP7WaYeyS5pS3ZA7iY4Fs-1F2Gymtata7A8nw@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 45379
Cc: juri@HIDDEN, styang@HIDDEN, stephen.berman@HIDDEN,
 rudalics@HIDDEN, monnier@HIDDEN, 45379 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> From: Stefan Kangas <stefan@HIDDEN>
> Date: Fri, 5 Mar 2021 20:44:33 -0800
> Cc: Juri Linkov <juri@HIDDEN>, martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, 
> 	45379 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>, 
> 	Stephen Berman <stephen.berman@HIDDEN>
> 
> It turns out that we were doing unnecessary looping due to the above
> mentioned commit.  While working on this, I also found that we can get
> rid of an unnecessary call to char_table_ref_and_range, which should
> make this function run even faster.

I'm not sure I understand the reasons for each of the changes here.
char-tables are a tricky data structure, so I'd like to make sure this
change doesn't make our code subtly incorrect.

So could you please walk us through the proposed changes, adding
explanations for each part as you go?

(And what do char-tables have to do with describing key bindings,
btw?)

> I'm also copying in Kenichi Handa, who was the last to touch this code.
> Handa-san, please let us know if you have any comments on this patch.
> Thanks in advance.

AFAICT, you didn't CC Kenichi; I have now added him to the discussion.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45379; Package emacs. Full text available.
Added tag(s) patch. Request was from Stefan Kangas <stefan@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 45379 <at> debbugs.gnu.org:


Received: (at 45379) by debbugs.gnu.org; 6 Mar 2021 04:44:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 05 23:44:42 2021
Received: from localhost ([127.0.0.1]:35845 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lIOny-0006wJ-4X
	for submit <at> debbugs.gnu.org; Fri, 05 Mar 2021 23:44:42 -0500
Received: from mail-pj1-f52.google.com ([209.85.216.52]:38753)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1lIOnw-0006w1-Dj
 for 45379 <at> debbugs.gnu.org; Fri, 05 Mar 2021 23:44:41 -0500
Received: by mail-pj1-f52.google.com with SMTP id
 q2-20020a17090a2e02b02900bee668844dso217488pjd.3
 for <45379 <at> debbugs.gnu.org>; Fri, 05 Mar 2021 20:44:40 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:in-reply-to:references:user-agent
 :mime-version:date:message-id:subject:to:cc;
 bh=6FP6XxRP0mHp0CBuxWl+jBG64Jpms1lBfwaIScH4Gt4=;
 b=nEAXOOFM4WEoZoup9S1tZxrDIeXj7MnviRZPZPuaZkdVLnXziIEQx50P6W39LoaEou
 SuB9jTrbB+/UAvBZeJxGkJEIiOnNwhikjhomB1lakVETiRnKU2ZCdZdpKkHK4iOhhCz2
 zYFfe4b8O1TYTUnb3O5OlT/2rVRp5ueiKfK5cg0NITzb+EcNYz6JJlkULi+FgruEgT8g
 zgcxmcuFgH5Z/90g0oGfWJmcjrGbiSCVH8R/S9XMGYXDI7Pn5nXPfnn50bPUEuUxU/Y0
 XM0u8t0Ab6MdxO0LZQZPAfAZhQL1wx9oM8dZO945oFmyt9KcrATJ2hYrkL+udt4GQceC
 i1vg==
X-Gm-Message-State: AOAM531JW1Li8GHPWqyI1djRSE9rA3uHcxoo4wjZ8LdR6blA/HSqJruj
 BFtpVo+CJ0KY+1QNDdm9PGuyEM82kbuTlGt7XuY=
X-Google-Smtp-Source: ABdhPJzvNXMkdISDGxnm1n9XOrd6dQzE8/1pYZGu6Z/XgBa2MtO95Yg0SKoKMW4j8LSWidwWYmqa6+jfMTM+v035+YY=
X-Received: by 2002:a17:902:b683:b029:e5:d0a4:c545 with SMTP id
 c3-20020a170902b683b02900e5d0a4c545mr11815249pls.41.1615005874648; Fri, 05
 Mar 2021 20:44:34 -0800 (PST)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Fri, 5 Mar 2021 20:44:33 -0800
From: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <CADwFkmn=GnQRNYbiA=zV8F1kPY+B5qHz4QhzvgkQMOia_x77Yw@HIDDEN>
 (Stefan Kangas's message of "Fri, 8 Jan 2021 11:08:14 -0600")
References: <02f717c6-dc96-4ba0-9117-2ef079ac556f@HIDDEN>
 <CADwFkmn=GnQRNYbiA=zV8F1kPY+B5qHz4QhzvgkQMOia_x77Yw@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Date: Fri, 5 Mar 2021 20:44:33 -0800
Message-ID: <CADwFkmkgYWQOzDP7WaYeyS5pS3ZA7iY4Fs-1F2Gymtata7A8nw@HIDDEN>
Subject: Re: bug#45379: 28.0.50;
 Degraded Performance of describe-buffer-bindings
To: Sheng Yang <styang@HIDDEN>
Content-Type: multipart/mixed; boundary="000000000000780e1805bcd6db14"
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 45379
Cc: Stephen Berman <stephen.berman@HIDDEN>, Juri Linkov <juri@HIDDEN>,
 martin rudalics <rudalics@HIDDEN>, Stefan Monnier <monnier@HIDDEN>,
 Eli Zaretskii <eliz@HIDDEN>, 45379 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

--000000000000780e1805bcd6db14
Content-Type: text/plain; charset="UTF-8"

tags 45379 + patch
thanks

Stefan Kangas <stefan@HIDDEN> writes:

> "Sheng Yang" <styang@HIDDEN> writes:
>
>> Hi Juri,
>>
>> I recently came across a regression of performance in Emacs for
>> describe bindings, which I have reported as bug#45379. After
>> bisection, the offending seems to be a commit a649034336 you pushed in
>> November 2020, to fix bug#5423. [...]
>>
>> a649034336 * bad Don't show key ranges if shadowed by different commands
>
> BTW, the offending commit is not Juri's.  It is mine:
>
>     Author: Stefan Kangas <stefan@HIDDEN>
>     Date:   Fri Nov 13 15:28:29 2020 +0100
>
>         Don't show key ranges if shadowed by different commands

Please try the attached patch and see that it fixes this performance
regression.

It turns out that we were doing unnecessary looping due to the above
mentioned commit.  While working on this, I also found that we can get
rid of an unnecessary call to char_table_ref_and_range, which should
make this function run even faster.

I'm also copying in Kenichi Handa, who was the last to touch this code.
Handa-san, please let us know if you have any comments on this patch.
Thanks in advance.

--000000000000780e1805bcd6db14
Content-Type: text/x-diff; charset="US-ASCII"; 
	name="0001-Fix-describe-buffer-bindings-performance-regression.patch"
Content-Disposition: attachment; 
	filename="0001-Fix-describe-buffer-bindings-performance-regression.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: d0363175bcc4f359_0.1

RnJvbSBmOTVjNzVmMTExMmMxYWFlMGJkMDZhNjc1M2I2MGNlOGE1OTFkNmUyIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBTdGVmYW4gS2FuZ2FzIDxzdGVmYW5AbWFyeGlzdC5zZT4KRGF0
ZTogU2F0LCA2IE1hciAyMDIxIDA1OjMyOjMyICswMTAwClN1YmplY3Q6IFtQQVRDSF0gRml4IGRl
c2NyaWJlLWJ1ZmZlci1iaW5kaW5ncyBwZXJmb3JtYW5jZSByZWdyZXNzaW9uCgoqIHNyYy9rZXlt
YXAuYyAoZGVzY3JpYmVfdmVjdG9yKTogSW1wcm92ZSBjaGFyLXRhYmxlIHBlcmZvcm1hbmNlIGJ5
CnJlbW92aW5nIGFuIHVubmVjZXNzYXJ5IGxvb3AuICAoQnVnIzQ1Mzc5KQooc3ltc19vZl9rZXlt
YXApIDxRc2VsZl9pbnNlcnRfY29tbWFuZD46IE5ldyBERUZTWU0uCi0tLQogc3JjL2tleW1hcC5j
IHwgNDcgKysrKysrKysrKysrKysrKysrKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KIDEg
ZmlsZSBjaGFuZ2VkLCAxOSBpbnNlcnRpb25zKCspLCAyOCBkZWxldGlvbnMoLSkKCmRpZmYgLS1n
aXQgYS9zcmMva2V5bWFwLmMgYi9zcmMva2V5bWFwLmMKaW5kZXggNzgyOTMxZmFkZi4uYzcwZGY5
OGE2ZSAxMDA2NDQKLS0tIGEvc3JjL2tleW1hcC5jCisrKyBiL3NyYy9rZXltYXAuYwpAQCAtMjky
MCw3ICsyOTIwLDcgQEAgZGVzY3JpYmVfdmVjdG9yIChMaXNwX09iamVjdCB2ZWN0b3IsIExpc3Bf
T2JqZWN0IHByZWZpeCwgTGlzcF9PYmplY3QgYXJncywKICAgTGlzcF9PYmplY3Qgc3VwcHJlc3Mg
PSBRbmlsOwogICBib29sIGZpcnN0ID0gdHJ1ZTsKICAgLyogUmFuZ2Ugb2YgZWxlbWVudHMgdG8g
YmUgaGFuZGxlZC4gICovCi0gIGludCBmcm9tLCB0bywgc3RvcDsKKyAgaW50IHRvLCBzdG9wOwog
CiAgIGlmICgha2V5bWFwX3ApCiAgICAgewpAQCAtMjk0MCwzMiArMjk0MCwzMyBAQCBkZXNjcmli
ZV92ZWN0b3IgKExpc3BfT2JqZWN0IHZlY3RvciwgTGlzcF9PYmplY3QgcHJlZml4LCBMaXNwX09i
amVjdCBhcmdzLAogICBpZiAocGFydGlhbCkKICAgICBzdXBwcmVzcyA9IGludGVybiAoInN1cHBy
ZXNzLWtleW1hcCIpOwogCi0gIGZyb20gPSAwOworICAvKiBJZiBWRUNUT1IgaXMgYSBjaGFyLXRh
YmxlLCB3ZSBoYWQgYmV0dGVyIHB1dCBhIGJvdW5kYXJ5CisgICAgIGJldHdlZW4gbm9ybWFsIGNo
YXJhY3RlcnMgKC0jeDNGRkY3RikgYW5kIDgtYml0IGNoYXJhY3RlcnMKKyAgICAgKCN4M0ZGRjgw
LSkuICAqLwogICBpZiAoQ0hBUl9UQUJMRV9QICh2ZWN0b3IpKQogICAgIHN0b3AgPSBNQVhfNV9C
WVRFX0NIQVIgKyAxLCB0byA9IE1BWF9DSEFSICsgMTsKICAgZWxzZQogICAgIHN0b3AgPSB0byA9
IEFTSVpFICh2ZWN0b3IpOwogCi0gIGZvciAoaW50IGkgPSBmcm9tOyA7IGkrKykKKyAgZm9yIChp
bnQgaSA9IDA7IGkgPCB0bzsgaSsrKQogICAgIHsKICAgICAgIGJvb2wgdGhpc19zaGFkb3dlZCA9
IGZhbHNlOwogICAgICAgTGlzcF9PYmplY3Qgc2hhZG93ZWRfYnkgPSBRbmlsOwotICAgICAgaW50
IHJhbmdlX2JlZywgcmFuZ2VfZW5kOworICAgICAgaW50IHJhbmdlX2JlZzsKICAgICAgIExpc3Bf
T2JqZWN0IHZhbCwgdGVtMjsKIAogICAgICAgbWF5YmVfcXVpdCAoKTsKIAotICAgICAgaWYgKGkg
PT0gc3RvcCkKLQl7Ci0JICBpZiAoaSA9PSB0bykKLQkgICAgYnJlYWs7Ci0JICBzdG9wID0gdG87
Ci0JfQotCiAgICAgICBpbnQgc3RhcnRpbmdfaSA9IGk7CiAKICAgICAgIGlmIChDSEFSX1RBQkxF
X1AgKHZlY3RvcikpCiAJeworCSAgLyogVGFrZSBjYXJlIG9mIHRoZSBib3VuZGFyeS4gICovCisJ
ICBpZiAoaSA9PSBzdG9wKQorCSAgICBzdG9wID0gdG87CisKKwkgIC8qIEZpbmQgdGhlIGZpcnN0
IGVsZW1lbnQgYmV0d2VlbiBpIGFuZCBzdG9wIC0gMS4gIFB1dCBpdHMKKwkgICAgIGluZGV4IGlu
IGkuICAqLwogCSAgcmFuZ2VfYmVnID0gaTsKIAkgIGkgPSBzdG9wIC0gMTsKIAkgIHZhbCA9IGNo
YXJfdGFibGVfcmVmX2FuZF9yYW5nZSAodmVjdG9yLCByYW5nZV9iZWcsICZyYW5nZV9iZWcsICZp
KTsKQEAgLTMwMjQsMjEgKzMwMjUsOCBAQCBkZXNjcmliZV92ZWN0b3IgKExpc3BfT2JqZWN0IHZl
Y3RvciwgTGlzcF9PYmplY3QgcHJlZml4LCBMaXNwX09iamVjdCBhcmdzLAogICAgICAgaW5zZXJ0
MSAoRmtleV9kZXNjcmlwdGlvbiAoa2x1ZGdlLCBwcmVmaXgpKTsKIAogICAgICAgLyogRmluZCBh
bGwgY29uc2VjdXRpdmUgY2hhcmFjdGVycyBvciByb3dzIHRoYXQgaGF2ZSB0aGUgc2FtZQotCSBk
ZWZpbml0aW9uLiAgQnV0LCBpZiBWRUNUT1IgaXMgYSBjaGFyLXRhYmxlLCB3ZSBoYWQgYmV0dGVy
Ci0JIHB1dCBhIGJvdW5kYXJ5IGJldHdlZW4gbm9ybWFsIGNoYXJhY3RlcnMgKC0jeDNGRkY3Rikg
YW5kCi0JIDgtYml0IGNoYXJhY3RlcnMgKCN4M0ZGRjgwLSkuICAqLwotICAgICAgaWYgKENIQVJf
VEFCTEVfUCAodmVjdG9yKSkKLQl7Ci0JICB3aGlsZSAoaSArIDEgPCBzdG9wCi0JCSAmJiAocmFu
Z2VfYmVnID0gaSArIDEsIHJhbmdlX2VuZCA9IHN0b3AgLSAxLAotCQkgICB2YWwgPSBjaGFyX3Rh
YmxlX3JlZl9hbmRfcmFuZ2UgKHZlY3RvciwgcmFuZ2VfYmVnLAotCQkJCQkJICAgJnJhbmdlX2Jl
ZywgJnJhbmdlX2VuZCksCi0JCSAgIHRlbTIgPSBnZXRfa2V5ZWx0ICh2YWwsIDApLAotCQkgICAh
TklMUCAodGVtMikpCi0JCSAmJiAhTklMUCAoRmVxdWFsICh0ZW0yLCBkZWZpbml0aW9uKSkpCi0J
ICAgIGkgPSByYW5nZV9lbmQ7Ci0JfQotICAgICAgZWxzZQorCSBkZWZpbml0aW9uLiAgKi8KKyAg
ICAgIGlmICghQ0hBUl9UQUJMRV9QICh2ZWN0b3IpKQogCXdoaWxlIChpICsgMSA8IHN0b3AKIAkg
ICAgICAgJiYgKHRlbTIgPSBnZXRfa2V5ZWx0IChBUkVGICh2ZWN0b3IsIGkgKyAxKSwgMCksCiAJ
CSAgICFOSUxQICh0ZW0yKSkKQEAgLTMwNDcsMTAgKzMwMzUsMTIgQEAgZGVzY3JpYmVfdmVjdG9y
IChMaXNwX09iamVjdCB2ZWN0b3IsIExpc3BfT2JqZWN0IHByZWZpeCwgTGlzcF9PYmplY3QgYXJn
cywKIAogICAgICAgLyogTWFrZSBzdXJlIGZvdW5kIGNvbnNlY3V0aXZlIGtleXMgYXJlIGVpdGhl
ciBub3Qgc2hhZG93ZWQgb3IsCiAJIGlmIHRoZXkgYXJlLCB0aGF0IHRoZXkgYXJlIHNoYWRvd2Vk
IGJ5IHRoZSBzYW1lIGNvbW1hbmQuICAqLwotICAgICAgaWYgKENIQVJfVEFCTEVfUCAodmVjdG9y
KSAmJiBpICE9IHN0YXJ0aW5nX2kpCisgICAgICBpZiAoQ0hBUl9UQUJMRV9QICh2ZWN0b3IpICYm
IGkgIT0gc3RhcnRpbmdfaQorCSAgLyogSWdub3JlIGBzZWxmLWluc2VydC1jb21tYW5kJyBmb3Ig
cGVyZm9ybWFuY2UuICAqLworCSAgJiYgIUVRIChkZWZpbml0aW9uLCBRc2VsZl9pbnNlcnRfY29t
bWFuZCkpCiAJewogCSAgTGlzcF9PYmplY3Qga2V5ID0gbWFrZV9uaWxfdmVjdG9yICgxKTsKLQkg
IGZvciAoaW50IGogPSBzdGFydGluZ19pICsgMTsgaiA8PSBpOyBqKyspCisJICBmb3IgKGludCBq
ID0gcmFuZ2VfYmVnICsgMTsgaiA8PSBpOyBqKyspCiAJICAgIHsKIAkgICAgICBBU0VUIChrZXks
IDAsIG1ha2VfZml4bnVtIChqKSk7CiAJICAgICAgTGlzcF9PYmplY3QgdGVtID0gc2hhZG93X2xv
b2t1cCAoc2hhZG93LCBrZXksIFF0LCAwKTsKQEAgLTMxMDksNiArMzA5OSw3IEBAIHN5bXNfb2Zf
a2V5bWFwICh2b2lkKQogICBERUZTWU0gKFFkZXNjcmliZV9tYXBfdHJlZSwgImRlc2NyaWJlLW1h
cC10cmVlIik7CiAKICAgREVGU1lNIChRa2V5bWFwX2Nhbm9uaWNhbGl6ZSwgImtleW1hcC1jYW5v
bmljYWxpemUiKTsKKyAgREVGU1lNIChRc2VsZl9pbnNlcnRfY29tbWFuZCwgInNlbGYtaW5zZXJ0
LWNvbW1hbmQiKTsKIAogICAvKiBOb3cgd2UgYXJlIHJlYWR5IHRvIHNldCB1cCB0aGlzIHByb3Bl
cnR5LCBzbyB3ZSBjYW4KICAgICAgY3JlYXRlIGNoYXIgdGFibGVzLiAgKi8KLS0gCjIuMzAuMQoK
--000000000000780e1805bcd6db14--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45379; Package emacs. Full text available.

Message received at 45379 <at> debbugs.gnu.org:


Received: (at 45379) by debbugs.gnu.org; 4 Feb 2021 15:43:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 04 10:43:54 2021
Received: from localhost ([127.0.0.1]:42022 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l7gnR-0005A2-3P
	for submit <at> debbugs.gnu.org; Thu, 04 Feb 2021 10:43:54 -0500
Received: from out4-smtp.messagingengine.com ([66.111.4.28]:51517)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <styang@HIDDEN>) id 1l7gnQ-00059q-CQ
 for 45379 <at> debbugs.gnu.org; Thu, 04 Feb 2021 10:43:52 -0500
Received: from compute6.internal (compute6.nyi.internal [10.202.2.46])
 by mailout.nyi.internal (Postfix) with ESMTP id 0F3695C00E4;
 Thu,  4 Feb 2021 10:43:47 -0500 (EST)
Received: from imap2 ([10.202.2.52])
 by compute6.internal (MEProxy); Thu, 04 Feb 2021 10:43:47 -0500
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=yi/bqAjXHtIKM5S1U2iWw/zvYtJwXOZ
 GyuTqYo7p/tU=; b=pC57n2w4AWiUYZfC8AwhZdTYXPnyo0GPJcjOU6Uewo0eT7B
 1ZcqblIHPuxg970tctKVuxjavr+g4w6mNJOJXmm9LQ9fQ8rMvxze7nmRUCF5K6B2
 fjCXfJRO3bxbYQoW6TxPx76594TlwKdnql7fvpJ3Oa34TrV21wPi99pBiG0GCYX4
 OkgIFzmKEfAQ48OYvfDr3teQikEibLD9nbbpdpG9RGxLl0Dt0Prmex7S41epiMno
 3/Ppjr2mTxFDZxMqomtBtVLy4ODaJHij8lmysyPywB9EIhCjkI2+1lCsf7ZMzXSk
 k7iz+A/4X6p+lO7wpr/GdxiuxV29Z6hHXyVeitQ==
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=yi/bqA
 jXHtIKM5S1U2iWw/zvYtJwXOZGyuTqYo7p/tU=; b=NZikOYBcg4FqpOeRVJJihC
 lCw1kCYbE3ex7f0c1J7Z/rLRaGVpyw0VuaBjIILwdyQyj3rMjLTfU1Owag8fGg5v
 l2xI6NFm07E5H0wc+eHc0BOaibW+I+HJxqL4locpLsRsnk2BB5LCIYF9H0ErfL+T
 49OrF+j9L4fbfru/CR7o/fqlrFgFGBDWIHCv1L2Zgz9N/052hkVktiKSdhpbf9gB
 w9S6rTV17thKKxcyqJ6Hk5h416j+s9DX2b/pzkHgJW6JYQQiU42RwUHMnTL4pR4O
 QtmweqoUfZ+IZeIgb+jsGc7HEaDnSuZmFSBU3WUsNhl5MNHkWxJF+WEJioUZ6Ezg
 ==
X-ME-Sender: <xms:MhYcYOzvSx5Wgi6BOMemCpcSMeJWIvbBNr0ykT5cUMpO5giWeiVHPw>
 <xme:MhYcYKRLaT3XQjOFnHP1rpeHDPAAV6S8UpoJkGs7ejSbbwJ0F15KvZbZVpN_-Z4oH
 h4uwx-veGvXgWwAC2M>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrgeeggdejudcutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc
 fjughrpefofgggkfgjfhffhffvufgtsegrtderreerreejnecuhfhrohhmpedfufhhvghn
 ghcujggrnhhgfdcuoehsthihrghnghesfhgrshhtmhgrihhlrdgtohhmqeenucggtffrrg
 htthgvrhhnpeehleeutdduffffgeffieelteetvdduieehhfevgfdviedvtddtieefieeg
 geevjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe
 hsthihrghnghesfhgrshhtmhgrihhlrdgtohhm
X-ME-Proxy: <xmx:MhYcYAXlWqrXSBfLQg5fBPUFIedUEwTfi4nb7yPxk_gPtKcazgaQ1g>
 <xmx:MhYcYEht9e0JPQPb2qjj-W74ZSpUXr8KTXXRweGKLRMgQX3IRnXp4w>
 <xmx:MhYcYAD8UTw7S_zdMY-ntnK_nZtGCmb0tsgxYANnHgHBwsBSY6XvDA>
 <xmx:MxYcYD9VlH4Z5AnGOCKD3dTGpUZzUCg-6OSiIlVRR63vozgF0O8hxg>
Received: by mailuser.nyi.internal (Postfix, from userid 501)
 id 22ED6A0005D; Thu,  4 Feb 2021 10:43:46 -0500 (EST)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.5.0-alpha0-93-gef6c4048e6-fm-20210128.002-gef6c4048
Mime-Version: 1.0
Message-Id: <d7ccaa7e-076c-4a2c-a002-643ed85f80d1@HIDDEN>
In-Reply-To: <CADwFkmn=GnQRNYbiA=zV8F1kPY+B5qHz4QhzvgkQMOia_x77Yw@HIDDEN>
References: <02f717c6-dc96-4ba0-9117-2ef079ac556f@HIDDEN>
 <CADwFkmn=GnQRNYbiA=zV8F1kPY+B5qHz4QhzvgkQMOia_x77Yw@HIDDEN>
Date: Thu, 04 Feb 2021 09:43:25 -0600
From: "Sheng Yang" <styang@HIDDEN>
To: "Stefan Kangas" <stefan@HIDDEN>, "Juri Linkov" <juri@HIDDEN>
Subject: Re: 28.0.50; Degraded Performance of describe-buffer-bindings
Content-Type: multipart/alternative; boundary=7d78b844a1a94631be88cf7a46bbc050
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 45379
Cc: martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 45379 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>,
 Stephen Berman <stephen.berman@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--7d78b844a1a94631be88cf7a46bbc050
Content-Type: text/plain;charset=utf-8
Content-Transfer-Encoding: quoted-printable

Any update on this bug?=20

On Fri, Jan 8, 2021, at 11:08, Stefan Kangas wrote:
> "Sheng Yang" <styang@HIDDEN> writes:
>=20
> > Hi Juri,
> >
> > I recently came across a regression of performance in Emacs for
> > describe bindings, which I have reported as bug#45379. After
> > bisection, the offending seems to be a commit a649034336 you pushed =
in
> > November 2020, to fix bug#5423. [...]
> >
> > a649034336 * bad Don't show key ranges if shadowed by different comm=
ands
>=20
> BTW, the offending commit is not Juri's.  It is mine:
>=20
>     Author: Stefan Kangas <stefan@HIDDEN>
>     Date:   Fri Nov 13 15:28:29 2020 +0100
>=20
>         Don't show key ranges if shadowed by different commands
>=20
> Thanks for the bug report!
>=20

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


--7d78b844a1a94631be88cf7a46bbc050
Content-Type: text/html;charset=utf-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html><html><head><title></title><style type=3D"text/css">p.Mso=
Normal,p.MsoNoSpacing{margin:0}</style></head><body><div>Any update on t=
his bug? <br></div><div><br></div><div>On Fri, Jan 8, 2021, at 11:08, St=
efan Kangas wrote:<br></div><blockquote type=3D"cite" id=3D"qt" style=3D=
""><div>"Sheng Yang" &lt;<a href=3D"mailto:styang@HIDDEN">styang@f=
astmail.com</a>&gt; writes:<br></div><div><br></div><div>&gt; Hi Juri,<b=
r></div><div>&gt;<br></div><div>&gt; I recently came across a regression=
 of performance in Emacs for<br></div><div>&gt; describe bindings, which=
 I have reported as bug#45379. After<br></div><div>&gt; bisection, the o=
ffending seems to be a commit a649034336 you pushed in<br></div><div>&gt=
; November 2020, to fix bug#5423. [...]<br></div><div>&gt;<br></div><div=
>&gt; a649034336 * bad Don't show key ranges if shadowed by different co=
mmands<br></div><div><br></div><div>BTW, the offending commit is not Jur=
i's.&nbsp; It is mine:<br></div><div><br></div><div>&nbsp;&nbsp;&nbsp; A=
uthor: Stefan Kangas &lt;<a href=3D"mailto:stefan@HIDDEN">stefan@mar=
xist.se</a>&gt;<br></div><div>&nbsp;&nbsp;&nbsp; Date:&nbsp;&nbsp; Fri N=
ov 13 15:28:29 2020 +0100<br></div><div><br></div><div>&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp; Don't show key ranges if shadowed by different=
 commands<br></div><div><br></div><div>Thanks for the bug report!<br></d=
iv><div><br></div></blockquote><div><br></div><div id=3D"sig97546008"><d=
iv class=3D"signature">Sheng Yang(=E6=9D=A8=E5=9C=A3), PhD candidate<br>=
</div><div class=3D"signature">Computer Science Department<br></div><div=
 class=3D"signature">University of Maryland, College Park<br></div><div =
class=3D"signature">E-mail: <a href=3D"mailto:styang@HIDDEN">styan=
g@HIDDEN</a><br></div><div class=3D"signature">E-mail (old but sti=
ll used): <a href=3D"mailto:yangsheng6810@HIDDEN">yangsheng6810@gmail=
.com</a><br></div><div class=3D"signature"><br></div></div><div><br></di=
v></body></html>
--7d78b844a1a94631be88cf7a46bbc050--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45379; Package emacs. Full text available.

Message received at 45379 <at> debbugs.gnu.org:


Received: (at 45379) by debbugs.gnu.org; 8 Jan 2021 17:08:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 08 12:08:24 2021
Received: from localhost ([127.0.0.1]:50537 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kxvFP-0004lO-Qq
	for submit <at> debbugs.gnu.org; Fri, 08 Jan 2021 12:08:24 -0500
Received: from mail-pf1-f172.google.com ([209.85.210.172]:38015)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1kxvFN-0004lA-Ie
 for 45379 <at> debbugs.gnu.org; Fri, 08 Jan 2021 12:08:22 -0500
Received: by mail-pf1-f172.google.com with SMTP id d2so6626735pfq.5
 for <45379 <at> debbugs.gnu.org>; Fri, 08 Jan 2021 09:08:21 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:in-reply-to:references:mime-version:date
 :message-id:subject:to:cc;
 bh=75uGo1k/TCBNyFHivx/rpG9IQ+7vWAjSpWkQ3bLTtAg=;
 b=cvqmA+hoq1LWlO/gTLBTNu7jlJvRuyLc283bjj+hi7IwDQg3bRMRPp/0MAMOiA9s4/
 E1BoGGD0LRZZxutTGgzlBBXQNowPMp2rI5XYvTqjK4vdcmtKNhOZk4BrmKZHFvVA1Hrp
 w1Dv/bcyU3Vyvjn4yz2Fv9+scZN/enWmbY28mFtc80Kw/l72f22l5HUNfNYeAZJZSDtG
 645atVMdTi4bLTlZUYhe3LAO71k27z8ZAg6nN/YPaKOgHV3D23pj7hOSxcsCoCiJ3Ep2
 RMuHXDDPwvYucvDmJbmopHeMcv2oA4Y3Z3Ie959cR5X+QDzP51j6DWInnBny/6Lfeid4
 M+BA==
X-Gm-Message-State: AOAM530jk/W+BwbmABbS8w5q0zKhdX/bq50rJPDZZRXlRSX7jVT6OjgE
 38R2OsjPIb8CMCGRkKdo8linlams/M4bErq2EGw=
X-Google-Smtp-Source: ABdhPJxOyOiF2X+upNkCoymcz7yCIi+1OWstVe5W1OfINp4v/VfBDxpSYlybzeV0CyItImvsewf3KcXVHj/5YmGHFBA=
X-Received: by 2002:a63:6241:: with SMTP id w62mr7986921pgb.67.1610125695464; 
 Fri, 08 Jan 2021 09:08:15 -0800 (PST)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Fri, 8 Jan 2021 11:08:15 -0600
From: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <02f717c6-dc96-4ba0-9117-2ef079ac556f@HIDDEN>
References: <02f717c6-dc96-4ba0-9117-2ef079ac556f@HIDDEN>
MIME-Version: 1.0
Date: Fri, 8 Jan 2021 11:08:14 -0600
Message-ID: <CADwFkmn=GnQRNYbiA=zV8F1kPY+B5qHz4QhzvgkQMOia_x77Yw@HIDDEN>
Subject: Re: 28.0.50; Degraded Performance of describe-buffer-bindings
To: Sheng Yang <styang@HIDDEN>, Juri Linkov <juri@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 45379
Cc: martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 45379 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>,
 Stephen Berman <stephen.berman@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

"Sheng Yang" <styang@HIDDEN> writes:

> Hi Juri,
>
> I recently came across a regression of performance in Emacs for
> describe bindings, which I have reported as bug#45379. After
> bisection, the offending seems to be a commit a649034336 you pushed in
> November 2020, to fix bug#5423. [...]
>
> a649034336 * bad Don't show key ranges if shadowed by different commands

BTW, the offending commit is not Juri's.  It is mine:

    Author: Stefan Kangas <stefan@HIDDEN>
    Date:   Fri Nov 13 15:28:29 2020 +0100

        Don't show key ranges if shadowed by different commands

Thanks for the bug report!




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45379; Package emacs. Full text available.
Added tag(s) confirmed. Request was from Stefan Kangas <stefan@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 45379 <at> debbugs.gnu.org:


Received: (at 45379) by debbugs.gnu.org; 8 Jan 2021 17:00:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 08 12:00:17 2021
Received: from localhost ([127.0.0.1]:50527 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kxv7Z-0004Z2-L0
	for submit <at> debbugs.gnu.org; Fri, 08 Jan 2021 12:00:17 -0500
Received: from mail-pg1-f176.google.com ([209.85.215.176]:45761)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1kxv7X-0004Yo-CO
 for 45379 <at> debbugs.gnu.org; Fri, 08 Jan 2021 12:00:16 -0500
Received: by mail-pg1-f176.google.com with SMTP id v19so7970872pgj.12
 for <45379 <at> debbugs.gnu.org>; Fri, 08 Jan 2021 09:00:15 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:in-reply-to:references:mime-version:date
 :message-id:subject:to:cc;
 bh=EieibBCQyu6GTUFsu72HCQpSOY0TEREitKkQ44TdZeE=;
 b=P2ljqf7Jd/F+sjqRuobb5wAC6HOvn+SfgaIhpybaXuVwacaOaCmCVCS8OzWFzPFSJ5
 vx6lnRILl/5K2Ec5nktwSpUgzv42iCTPJqjzehlLMnTQkbrlee3/brNoOumiR3HS4SDQ
 V3ccu+jV1shKQhsvoToKzuecjZQLBkH0H6I4stbDRLSMQ3Wk3543wxd5CrVduVE18ZQV
 YSON0UYubet0ci3R0nJWK2+ppbST1LmLrhonv09v3GVLLVczG3YoET/APTOnEEsWQgJ7
 LPh6u8b5UoTPKAzwE8XMT4uefhO9tRoXtuaTfnMyTAR89O+7g4yECq27k3IZ4uaW+d0Z
 z9Wg==
X-Gm-Message-State: AOAM532UPwx7eZw6LwfF05nOYe2BHWF9xRVRr5cV/RBM40lvw5/Hz13R
 A0jgKKV7yGYWyhunVMAdkWbzebNbhqjyct3Jcc4=
X-Google-Smtp-Source: ABdhPJwvqDoXwyiiB+hbTrQbnXEi8ALuHxi4JkicFi7zkfcro1nCFTI/cBbP+OgDO++nUJRv0q8ty0V9A5YkMHcIcp4=
X-Received: by 2002:a63:6241:: with SMTP id w62mr7949430pgb.67.1610125209318; 
 Fri, 08 Jan 2021 09:00:09 -0800 (PST)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Fri, 8 Jan 2021 11:00:08 -0600
From: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <02f717c6-dc96-4ba0-9117-2ef079ac556f@HIDDEN>
References: <02f717c6-dc96-4ba0-9117-2ef079ac556f@HIDDEN>
MIME-Version: 1.0
Date: Fri, 8 Jan 2021 11:00:08 -0600
Message-ID: <CADwFkmkr6gM6rEcEmmdx_rXjUCwsiDX0eSbHZpfBLZd7owz_Sg@HIDDEN>
Subject: Re: 28.0.50; Degraded Performance of describe-buffer-bindings
To: Sheng Yang <styang@HIDDEN>, Juri Linkov <juri@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 45379
Cc: martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 45379 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>,
 Stephen Berman <stephen.berman@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

"Sheng Yang" <styang@HIDDEN> writes:

> Since I have received no reply after bug#45379 was reported (more than
> 2 weeks), I guess it's better to contact you and cc every participants
> of bug#5423.

Thanks for the ping.  I am working on a fix that I'm hoping to find the
time to finish up soon, possibly already this weekend.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45379; Package emacs. Full text available.

Message received at 45379 <at> debbugs.gnu.org:


Received: (at 45379) by debbugs.gnu.org; 8 Jan 2021 16:48:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 08 11:48:16 2021
Received: from localhost ([127.0.0.1]:50516 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kxuvw-0004FS-47
	for submit <at> debbugs.gnu.org; Fri, 08 Jan 2021 11:48:16 -0500
Received: from out5-smtp.messagingengine.com ([66.111.4.29]:59911)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <styang@HIDDEN>) id 1kxuvu-0004FD-2C
 for 45379 <at> debbugs.gnu.org; Fri, 08 Jan 2021 11:48:15 -0500
Received: from compute6.internal (compute6.nyi.internal [10.202.2.46])
 by mailout.nyi.internal (Postfix) with ESMTP id E63055C029C;
 Fri,  8 Jan 2021 11:48:08 -0500 (EST)
Received: from imap2 ([10.202.2.52])
 by compute6.internal (MEProxy); Fri, 08 Jan 2021 11:48:08 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h=
 mime-version:message-id:date:from:to:cc:subject:content-type; s=
 fm1; bh=hQuEWtpxggdmb923axQ7NT+oQb2Vz0PEo1Tk7xP5bT0=; b=RPmXmvsJ
 wRtW1v+2RrQ+wYznJoxakQEzScr+zWAmNSl+e1YSELMTqfARks/aoKDzQgUq7Dsm
 W9qBP0+uTXJmXc/KtRPdxyn6mPWWswL9+nhzW/pr8NiQt5lJ+gKc5x3zrfzDCgfw
 EPoJ7F6ap+stXS6wAc5wlK4NSAZ9J2SgpdDGiKRe6S44DVplu3oDyUTZTgQoQDcd
 lGpLvrUGem/LOZReipdgIdjCjiNE2igFfzSZPWh3jaW88KlBitvpX5al6hZvkvWS
 b19NiEGvBeg8TSx+jnILKO5kxIobXpJQmE53eyuHdrYNxPLSmxfF9uJ2M0SSBbCZ
 s/eIFPHJQVkNDQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:message-id
 :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm1; bh=hQuEWtpxggdmb923axQ7NT+oQb2Vz
 0PEo1Tk7xP5bT0=; b=oC61bwlNIm8V0+qE/B4VASumzW0feYsO8oJpIVCsFKoDr
 XE/L5VhY3YL1a4U1A77CjJrRmJ+6VtpZ8rgkN1i8HxPHlW4jvuADY7jeqPHahsF2
 dShuzIKqy7QZzMmJBjU7q4J/GqtkZrkfkXNadSx+RDzQwVFed1M+AYgZJyQ/XET2
 JuemaFUD573RdzlKXNnn2jW7IyYHLffXsfrT6oPko1Cg2SYt2NZxHHCjByzxTyv4
 pwtrhi3AgePTRGxf4OkLej5hH1AnAWvEgC3y1ZheD9z3q7o3fJ03ani6bt7GkqXW
 aM9TGR515h8T8KTyL5YzLahQ4uOTvzAtBgQ5AfFqA==
X-ME-Sender: <xms:yIz4X5uSE3QXs0S2Ly-KEJmTjgYRSswsn8j_he-q40ZEH2SXjgf_aw>
 <xme:yIz4XyfK5toVfmmeA6-lz2f2Fru9W-R-gDBM2sdj9bMXV7L-EWS2HS1XD10oywAwz
 XaRRD8RnUe1DEyrtns>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdeghedgvdegucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepofgfggfkfffhvffutgesrgdtreerreerjeenucfhrhhomhepfdfuhhgvnhhg
 ucgjrghnghdfuceoshhthigrnhhgsehfrghsthhmrghilhdrtghomheqnecuggftrfgrth
 htvghrnhepjeevvdehkedugefgudfhudeiieelvdefvdekheeludeuhfelueeghedtkeeu
 teeunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepsh
 hthigrnhhgsehfrghsthhmrghilhdrtghomh
X-ME-Proxy: <xmx:yIz4X8x0N7PoV6Fa3w7F2JYggKEjAQ7VVJXibU5BksZaauXcthlkOg>
 <xmx:yIz4XwNvf_peTOGN_EpANOtx9w-ISjLlZeqnYl9v3FlMyueXPtp28g>
 <xmx:yIz4X5-6BlPbU645YdaxVjuyYmXMc2s-Wak8dX2lzLbEOONjd95V_g>
 <xmx:yIz4X1aKJWGs1Gzedr4RBiqyGGjSsJHviAcM4q6l4--4w91ybp4cZQ>
Received: by mailuser.nyi.internal (Postfix, from userid 501)
 id 66018E00DC; Fri,  8 Jan 2021 11:48:06 -0500 (EST)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.3.1-61-gb52c239-fm-20201210.001-gb52c2396
Mime-Version: 1.0
Message-Id: <02f717c6-dc96-4ba0-9117-2ef079ac556f@HIDDEN>
Date: Fri, 08 Jan 2021 10:47:47 -0600
From: "Sheng Yang" <styang@HIDDEN>
To: "Juri Linkov" <juri@HIDDEN>
Subject: Re: 28.0.50; Degraded Performance of describe-buffer-bindings
Content-Type: multipart/alternative; boundary=68704380d348437199d88f5a9068e7db
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Hi Juri, I recently came across a regression of performance
 in Emacs for describe bindings, which I have reported as bug#45379. After
 bisection, the offending seems to be a commit a649034336 you pushed in Nove
 [...] Content analysis details:   (1.3 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (styang[at]fastmail.com)
 0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
 [66.111.4.29 listed in wl.mailspike.net]
 0.0 HTML_MESSAGE           BODY: HTML included in message
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [66.111.4.29 listed in list.dnswl.org]
 0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
 1.0 HEXHASH_WORD           Multiple instances of word + hexadecimal hash
 1.0 FREEMAIL_REPLY         From and body contain different freemails
X-Debbugs-Envelope-To: 45379
Cc: Stephen Berman <stephen.berman@HIDDEN>, Stefan Kangas <stefan@HIDDEN>,
 martin rudalics <rudalics@HIDDEN>, Stefan Monnier <monnier@HIDDEN>,
 Eli Zaretskii <eliz@HIDDEN>, 45379 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--68704380d348437199d88f5a9068e7db
Content-Type: text/plain;charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi Juri,

I recently came across a regression of performance in Emacs for describe=
 bindings, which I have reported as bug#45379. After bisection, the offe=
nding seems to be a commit a649034336 you pushed in November 2020, to fi=
x bug#5423. Since I have received no reply after bug#45379 was reported =
(more than 2 weeks), I guess it's better to contact you and cc every par=
ticipants of bug#5423. I am including the description of the bug report =
here for your convenience.

> `describe-buffer-bindings` has become significantly slower since the
following commit

a649034336 * bad Don't show key ranges if shadowed by different commands=


This also makes `describe-bindings` and anything depending on it hardly
usable. For me, it takes about 2 seconds on vanilla Emacs in an org-mode=

buffer, and a few minutes on my Emacs configuration (was almost instant
before the offending commit).
>=20

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


--68704380d348437199d88f5a9068e7db
Content-Type: text/html;charset=utf-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html><html><head><title></title><style type=3D"text/css">p.Mso=
Normal,p.MsoNoSpacing{margin:0}</style></head><body><div>Hi Juri,<br></d=
iv><div><br></div><div>I recently came across a regression of performanc=
e in Emacs for describe bindings, which I have reported as bug#45379. Af=
ter bisection, the offending seems to be a commit a649034336 you pushed =
in November 2020, to fix bug#5423. Since I have received no reply after =
bug#45379 was reported (more than 2 weeks), I guess it's better to conta=
ct you and cc every participants of bug#5423. I am including the descrip=
tion of the bug report here for your convenience.<br></div><div><br></di=
v><blockquote type=3D"cite"><pre class=3D"message">`describe-buffer-bind=
ings` has become significantly slower since the
following commit

a649034336 * bad Don't show key ranges if shadowed by different commands=


This also makes `describe-bindings` and anything depending on it hardly
usable. For me, it takes about 2 seconds on vanilla Emacs in an org-mode=

buffer, and a few minutes on my Emacs configuration (was almost instant
before the offending commit).<br></pre><div><br></div></blockquote><div>=
<br></div><div id=3D"sig97546008"><div class=3D"signature">Sheng Yang(=E6=
=9D=A8=E5=9C=A3), PhD candidate<br></div><div class=3D"signature">Comput=
er Science Department<br></div><div class=3D"signature">University of Ma=
ryland, College Park<br></div><div class=3D"signature">E-mail: <a href=3D=
"mailto:styang@HIDDEN">styang@HIDDEN</a><br></div><div class=
=3D"signature">E-mail (old but still used): <a href=3D"mailto:yangsheng6=
810@HIDDEN">yangsheng6810@HIDDEN</a><br></div><div class=3D"signat=
ure"><br></div></div><div><br></div></body></html>
--68704380d348437199d88f5a9068e7db--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45379; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Dec 2020 06:02:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 23 01:02:03 2020
Received: from localhost ([127.0.0.1]:51534 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1krxDn-0002E4-L5
	for submit <at> debbugs.gnu.org; Wed, 23 Dec 2020 01:02:03 -0500
Received: from lists.gnu.org ([209.51.188.17]:44172)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <styang@HIDDEN>) id 1krxDl-0002Cj-VA
 for submit <at> debbugs.gnu.org; Wed, 23 Dec 2020 01:02:02 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:39120)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <styang@HIDDEN>)
 id 1krxDl-0008Ms-I9
 for bug-gnu-emacs@HIDDEN; Wed, 23 Dec 2020 01:02:01 -0500
Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:48017)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <styang@HIDDEN>)
 id 1krxDi-0000F0-QP
 for bug-gnu-emacs@HIDDEN; Wed, 23 Dec 2020 01:02:00 -0500
Received: from compute6.internal (compute6.nyi.internal [10.202.2.46])
 by mailout.west.internal (Postfix) with ESMTP id 75B8EC79
 for <bug-gnu-emacs@HIDDEN>; Wed, 23 Dec 2020 01:01:55 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute6.internal (MEProxy); Wed, 23 Dec 2020 01:01:55 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h=
 from:to:subject:date:message-id:mime-version:content-type
 :content-transfer-encoding; s=fm1; bh=/unyVMCE5hMYk2P4bHU7Z9Pxsg
 BByBWt5AvpENykSGo=; b=mXlQYG4lkdGJLvPvqRRke37elxHpcUau04jp1FhG2r
 0wm66rivHwuh/mmvGCg8hfZ9wjNZsxwAlOrjlb7l2NddPQv83oXjhu/gHp7bUvHh
 OJQ9E3g1YQw7uMUO3dD/nKW2BjWs8WHeXxb8Myfjsf+Ah3DWxM1pQRAUsJ3iuSXk
 ryDKjLpJky9EEdqpvwxUGU9i48MDv9qRkGltAYbwnOWHAUXBwea5mmI6f5pV/O7U
 hU/SftKey6EvlHPYgqvFUgcxpxBQoQpRLW8LCPj+PS3lvVmXe0CXAxcTploDqnNy
 hoyZ6IdwxpQXM3p6tnCxpXVGFbCtl/ZiPYXZWgyP7R7Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-transfer-encoding:content-type
 :date:from:message-id:mime-version:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=/unyVM
 CE5hMYk2P4bHU7Z9PxsgBByBWt5AvpENykSGo=; b=NIID9JY5zErXq0CmNnhLij
 Uum4jaAUfjFyUz2oUe4upLw/Iyt/D+dZFXC2SUkVSCbcjZOZUZZCqnFiJ4lCE7QE
 eC/TA0tjrgY2E/a8Hf0c1HDRnyjapLdns3xBrYNTMiNjxVyfxAmLIuPHg4Ti5HSc
 Q+8JRRBTmsgBfGq1Kut+S3roXjFUNz2Igmerx5+seLpU3NuUAsLkVdS1ZBv+wcCY
 EAjmvlJQIOngKX+j5Efby3CTijNm4TFVS3cV/dTDYv8OEE8A21UMmpY+Dyso15kL
 W0m0bovFs749V0eUkG+/O4jMxzEbD5IAdYY1H1g3XlJK9o9AbPfNOVGp8JUXwz8Q
 ==
X-ME-Sender: <xms:Ut3iXzN1gFbUdOtq147Ys8X5wmCdY47QGTpGiGLs62C0NEWLdQv_cg>
 <xme:Ut3iX9_U98oLfjcb6jJiyGZsVk4ezx2-r6qPSllSiuWxHfscTpx2uRQpPFE400Y1T
 8AzPeLWWjy-niJQuYs>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddtiedgheefucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkgggtgfesthhqredttd
 dtjeenucfhrhhomhepshhthigrnhhgsehfrghsthhmrghilhdrtghomhenucggtffrrght
 thgvrhhnpedtveeufeehleekheeuudevvedvhfeiveeuheevjeeileelhffgkedvjeelke
 dutdenucfkphepjeefrddvtdekrddugeelrdekfeenucevlhhushhtvghrufhiiigvpedt
 necurfgrrhgrmhepmhgrihhlfhhrohhmpehsthihrghnghesfhgrshhtmhgrihhlrdgtoh
 hm
X-ME-Proxy: <xmx:Ut3iXyRVuqtjpgVVbTr7Cqt6uIJfcFnHUkoc-BrtIGajLe19ngR4cA>
 <xmx:Ut3iX3sE6IDRcwN5_vE0fpUEjHFxXtPGB2AHeUwj4OJ1JnuRRuIjnw>
 <xmx:Ut3iX7cueF7JhD17ZUZZMNr65jQ-XzH5oKxHG3PmobHOWS0La0vf1w>
 <xmx:U93iX1ozCRmGiKZK6eG3FhLW-mctzNnOy0FZE0mLyd6i__aUGn3tdw>
Received: from localhost (c-73-208-149-83.hsd1.il.comcast.net [73.208.149.83])
 by mail.messagingengine.com (Postfix) with ESMTPA id AA46724005B
 for <bug-gnu-emacs@HIDDEN>; Wed, 23 Dec 2020 01:01:54 -0500 (EST)
From: styang@HIDDEN
To: bug-gnu-emacs@HIDDEN
Subject: 28.0.50; Degraded Performance of describe-buffer-bindings
Date: Wed, 23 Dec 2020 00:01:53 -0600
Message-ID: <87a6u5m566.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=64.147.123.24; envelope-from=styang@HIDDEN;
 helo=wout1-smtp.messagingengine.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 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,
 FREEMAIL_REPLY=1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001,
 RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

`describe-buffer-bindings` has become significantly slower since the
following commit

a649034336 * bad Don't show key ranges if shadowed by different commands

This also makes `describe-bindings` and anything depending on it hardly
usable. For me, it takes about 2 seconds on vanilla Emacs in an org-mode
buffer, and a few minutes on my Emacs configuration (was almost instant
before the offending commit).

--=20
Sheng Yang(=E6=9D=A8=E5=9C=A3), PhD student
Computer Science Department
University of Maryland, College Park
E-mail: styang@HIDDEN
E-mail(old): yangsheng6810@HIDDEN




Acknowledgement sent to styang@HIDDEN:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#45379; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 3 Jun 2021 17:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.