unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Eli Zaretskii <eliz@gnu.org>
Cc: styang@fastmail.com, 45379@debbugs.gnu.org, juri@linkov.net,
	handa@gnu.org, monnier@iro.umontreal.ca,
	Lars Ingebrigtsen <larsi@gnus.org>,
	stephen.berman@gmx.net
Subject: bug#45379: 28.0.50; Degraded Performance of describe-buffer-bindings
Date: Sat, 18 Sep 2021 05:34:08 -0700	[thread overview]
Message-ID: <CADwFkmkf5w=ug8vP4OVvJ_4iw8KSGoaQEe1itWQj9bvVwA7teA@mail.gmail.com> (raw)
In-Reply-To: <8335q26uey.fsf@gnu.org>

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Tue, 07 Sep 2021 21:53:16 +0300
>> From: Eli Zaretskii <eliz@gnu.org>
>> Cc: stephen.berman@gmx.net, handa@gnu.org, juri@linkov.net, styang@fastmail.com,
>>  monnier@iro.umontreal.ca, 45379@debbugs.gnu.org
>>
>> Ping!  Stefan, can we please resolve this issue?  I think we cannot
>> release Emacs 28 without fixing this regression.
>
> Since we are close to cutting the emacs-28 release branch, and this
> bug didn't see any loving care for a long time, I went ahead and fixed
> this performance degradation myself, based on patches by Stefan Kangas
> and their discussions in this bug report.

Thanks, I appreciate the help.

[I had intended to get to it this weekend based on your recent ping; for
 me this stuff (as opposed to ELisp shenanigans) requires a decent chunk
 of time to sit down and properly focus.]

> The feature whereby we check whether shadowing of consecutive keys is
> by the same command, which AFAIU is what caused the regression, is now
> optional, by default off.  There's a new variable,
> 'describe-bindings-check-shadowing-in-ranges', which can be used to
> turn it on, and an optional value of that variable,
> 'ignore-self-insert', which provides some partial testing of shadowing
> in these cases by trading accuracy for performance.

OK.  The bug doesn't directly affect me, but now people who are affected
can enable the bug fix.

> And I have a question about this whole "shadowing detection" feature.
> If I repeat the recipe of bug#9293, which started all this, i.e.
>
>   emacs -Q
>   C-x C-f some-tarball-file.tar.gz RET
>   M-x view-mode RET
>   C-h m
>
> then the *Help* buffer shows this at its start:
>
>   key             binding
>   ---             -------
>
>   0 .. 9	digit-argument
>   e		tar-extract  (currently shadowed by ‘View-exit’)
>   f		tar-extract
>
>   C-d		tar-flag-deleted
>   RET		tar-extract
>     (this binding is currently shadowed)
>   C-n		tar-next-line
>   C-p		tar-previous-line
>   SPC		tar-next-line
>     (this binding is currently shadowed)
>   C		tar-copy
>     (this binding is currently shadowed)
>
> Note how the shadowing of 'e' is described with the command that
> shadows it, but the shadowing of RET, SPC, and 'C' isn't.  Why is
> that?  Is that a separate bug?

It is a separate bug, I think.  The "currently shadowed part" is new in
commit fb9326b45c76, but it was never fixed for the second case.

Which of the two messages is shown has to do with whether or not this is
a regular keymap or a sparse keymap.  They were always handled slightly
differently, but now we have the changed message for one of them that
makes this visible.

> for some reason bug#9293 discussed only a small part of the *Help*
> display and never looked beyond that.

I overlooked the case you mention, indeed.





  reply	other threads:[~2021-09-18 12:34 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-23  6:01 bug#45379: 28.0.50; Degraded Performance of describe-buffer-bindings styang
2021-01-08 16:47 ` Sheng Yang
2021-01-08 17:00   ` Stefan Kangas
2021-01-08 17:08   ` Stefan Kangas
2021-02-04 15:43     ` Sheng Yang
2021-03-06  4:44     ` Stefan Kangas
2021-03-06  8:15       ` Eli Zaretskii
2021-03-07  1:42         ` handa
2021-03-07  6:15           ` Eli Zaretskii
2021-03-30  7:01             ` Eli Zaretskii
2021-04-01 15:06               ` handa
2021-04-14  3:06                 ` Sheng Yang
2021-03-07  8:12         ` Stefan Kangas
2021-03-07  8:38           ` Eli Zaretskii
2021-05-04 23:31       ` Stefan Kangas
2021-05-06 10:11         ` Eli Zaretskii
2021-05-13 10:10         ` Eli Zaretskii
2021-06-26 21:51           ` Sheng Yang
2021-06-27  5:56             ` Eli Zaretskii
2021-09-07 18:53           ` Eli Zaretskii
2021-09-18 10:37             ` Eli Zaretskii
2021-09-18 12:34               ` Stefan Kangas [this message]
2021-09-18 13:24                 ` Eli Zaretskii
2021-09-18 14:39                   ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADwFkmkf5w=ug8vP4OVvJ_4iw8KSGoaQEe1itWQj9bvVwA7teA@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=45379@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=handa@gnu.org \
    --cc=juri@linkov.net \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=stephen.berman@gmx.net \
    --cc=styang@fastmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).