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

Previous Next

Package: emacs;

Reported by: styang <at> fastmail.com

Date: Wed, 23 Dec 2020 06:03:01 UTC

Severity: normal

Tags: confirmed, fixed, patch

Merged with 47494, 47565, 48812

Found in version 28.0.50

Fixed in version 28.1

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefan <at> marxist.se>
To: Eli Zaretskii <eliz <at> gnu.org>, Kenichi Handa <handa <at> gnu.org>
Cc: juri <at> linkov.net, styang <at> fastmail.com, stephen.berman <at> gmx.net, rudalics <at> gmx.at, monnier <at> iro.umontreal.ca, 45379 <at> debbugs.gnu.org
Subject: bug#45379: 28.0.50; Degraded Performance of describe-buffer-bindings
Date: Sun, 7 Mar 2021 03:12:17 -0500
Eli Zaretskii <eliz <at> gnu.org> 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




This bug report was last modified 3 years and 242 days ago.

Previous Next


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