GNU bug report logs - #41029
Improve ido-switch-buffer performance when many buffers are open

Previous Next

Package: emacs;

Reported by: Arnold Noronha <arnold <at> tdrhq.com>

Date: Sat, 2 May 2020 16:05:01 UTC

Severity: wishlist

Tags: patch

Fixed in version 28.1

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 41029 in the body.
You can then email your comments to 41029 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#41029; Package emacs. (Sat, 02 May 2020 16:05:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Arnold Noronha <arnold <at> tdrhq.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 02 May 2020 16:05:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Arnold Noronha <arnold <at> tdrhq.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Improve ido-switch-buffer performance when many buffers are open
Date: Sat, 2 May 2020 08:40:55 -0700
[Message part 1 (text/plain, inline)]
Many of the buffer locals (in particular I think it's the
SYMBOL_FORWARDED types --- my terminoly may be off), appear to be O(n)
to bind, where n is the number of live buffers.

I tried to see if I can optimize that binding process directly, but
couldn't figure out a way to do it without changing current behavior,
so I opted to just optimize ido-switch-buffer directly.

After this patch, the performance is quite bearable at ~6000 buffers,
but still not ideal.
[0001-Avoid-binding-CASE-FOLD-SEARCH-in-tight-loop.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41029; Package emacs. (Sat, 02 May 2020 17:08:01 GMT) Full text and rfc822 format available.

Message #8 received at 41029 <at> debbugs.gnu.org (full text, mbox):

From: Arnold Noronha <arnold <at> tdrhq.com>
To: 41029 <at> debbugs.gnu.org
Subject: Re: bug#41029: Acknowledgement (Improve ido-switch-buffer
 performance when many buffers are open)
Date: Sat, 2 May 2020 09:30:18 -0700
[Message part 1 (text/plain, inline)]
Updated patch (FLET was causing warnings/errors even though it seemed
to work. I don't know enough of elisp's bootstrapping process to know
why exactly.)
[0001-Avoid-binding-CASE-FOLD-SEARCH-in-tight-loop.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41029; Package emacs. (Sat, 02 May 2020 17:08:02 GMT) Full text and rfc822 format available.

Message #11 received at 41029 <at> debbugs.gnu.org (full text, mbox):

From: Arnold Noronha <arnold <at> tdrhq.com>
To: 41029 <at> debbugs.gnu.org
Subject: Re: bug#41029: Improve ido-switch-buffer performance when many
 buffers are open
Date: Sat, 2 May 2020 10:05:21 -0700
[Message part 1 (text/plain, inline)]
On Sat, May 02, 2020 at 08:40:55AM -0700, Arnold Noronha wrote:
> +         (flet ((inner ()

Updated patch (FLET was causing warnings/errors even though it seemed
to work. I don't know enough of elisp's bootstrapping process to know
why exactly.)
[0001-Avoid-binding-CASE-FOLD-SEARCH-in-tight-loop.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41029; Package emacs. (Sat, 02 May 2020 18:27:01 GMT) Full text and rfc822 format available.

Message #14 received at 41029 <at> debbugs.gnu.org (full text, mbox):

From: Arnold Noronha <arnold <at> tdrhq.com>
To: 41029 <at> debbugs.gnu.org
Subject: Re: bug#41029: Improve ido-switch-buffer performance when many
 buffers are open
Date: Sat, 2 May 2020 11:26:36 -0700
[Message part 1 (text/plain, inline)]
Actually, I realized this could be cleaner. Nicer patch attached.

--Arnold

On Sat, May 02, 2020 at 10:05:21AM -0700, Arnold Noronha wrote:
>
> On Sat, May 02, 2020 at 08:40:55AM -0700, Arnold Noronha wrote:
> > +         (flet ((inner ()
>
[0001-Use-a-temporary-buffer-before-calling-ido-ignore-ite.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41029; Package emacs. (Sun, 03 May 2020 02:04:02 GMT) Full text and rfc822 format available.

Message #17 received at 41029 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Arnold Noronha <arnold <at> tdrhq.com>, 41029 <at> debbugs.gnu.org
Subject: Re: bug#41029: Improve ido-switch-buffer performance when many
 buffers are open
Date: Sun, 3 May 2020 05:03:11 +0300
On 02.05.2020 21:26, Arnold Noronha wrote:
> Actually, I realized this could be cleaner. Nicer patch attached.

Looks fine to me, thanks. Unless someone expresses any objections in a 
week or so, we should install it.




Severity set to 'wishlist' from 'normal' Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 20 May 2020 15:49:02 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 20 May 2020 15:49:02 GMT) Full text and rfc822 format available.

Reply sent to Dmitry Gutov <dgutov <at> yandex.ru>:
You have taken responsibility. (Thu, 28 May 2020 23:37:01 GMT) Full text and rfc822 format available.

Notification sent to Arnold Noronha <arnold <at> tdrhq.com>:
bug acknowledged by developer. (Thu, 28 May 2020 23:37:02 GMT) Full text and rfc822 format available.

Message #26 received at 41029-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Arnold Noronha <arnold <at> tdrhq.com>, 41029-done <at> debbugs.gnu.org
Subject: Re: bug#41029: Improve ido-switch-buffer performance when many
 buffers are open
Date: Fri, 29 May 2020 02:36:31 +0300
Version: 28.1

On 03.05.2020 05:03, Dmitry Gutov wrote:
> On 02.05.2020 21:26, Arnold Noronha wrote:
>> Actually, I realized this could be cleaner. Nicer patch attached.
> 
> Looks fine to me, thanks. Unless someone expresses any objections in a 
> week or so, we should install it.

Now pushed to master. Thank you!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 26 Jun 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 78 days ago.

Previous Next


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