[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ido-switch-buffer is slow with many buffers; others are fast
From: |
Spencer Baugh |
Subject: |
Re: ido-switch-buffer is slow with many buffers; others are fast |
Date: |
Sat, 14 Nov 2020 19:19:27 -0500 |
Dmitry Gutov <dgutov@yandex.ru> writes:
> On 14.11.2020 18:34, catern@catern.com wrote:
>> I recently became annoyed enough in my 1000-buffer Emacs instance to
>> start profiling things.
>>
>> I was disappointed to find that the buffer-switching slowness I'd seen
>> is the fault of ido-switch-buffer.
>>
>> ido-switch-buffer takes over a second before it starts accepting user
>> input, with this many buffers.
>
> Which Emacs version are you using?
>
> A fix that seems relevant has been added in df4991093b9 recently. But
> it's only in Emacs 28 thus far.
Oh, indeed, that seems perfect! So, forget everything I said before -
this fixes ido's performance to be quite fine with large numbers of
buffers. So that specific problem is solved.
The associated bug#41029 mentions:
>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.
That's quite worrying - that implies that pretty much any code will run
slower as the number of buffers increases, even if it doesn't have
anything to do with buffers! This explains the slow performance of
let-binding case-fold-search that I mentioned in another branch of this
thread.
Is this poor scaling of binding buffer locals a known problem? Has
anyone worked on fixing this?
- ido-switch-buffer is slow with many buffers; others are fast, catern, 2020/11/14
- Re: ido-switch-buffer is slow with many buffers; others are fast, Stefan Monnier, 2020/11/14
- Re: ido-switch-buffer is slow with many buffers; others are fast, Dmitry Gutov, 2020/11/14
- Re: ido-switch-buffer is slow with many buffers; others are fast,
Spencer Baugh <=
- Re: ido-switch-buffer is slow with many buffers; others are fast, Stefan Monnier, 2020/11/15
- Re: ido-switch-buffer is slow with many buffers; others are fast, Spencer Baugh, 2020/11/15
- Re: ido-switch-buffer is slow with many buffers; others are fast, Arnold Noronha, 2020/11/15
- [PATCH 02/10] Add bset_save_length and use it, Spencer Baugh, 2020/11/19
- [PATCH 04/10] Use bset_enable_multibyte_characters everywhere, Spencer Baugh, 2020/11/19
- [PATCH 00/10] Speeding up DEFVAR_PER_BUFFER (Was: ido-switch-buffer is slow), Spencer Baugh, 2020/11/19
- Re: [PATCH 00/10] Speeding up DEFVAR_PER_BUFFER, Stefan Monnier, 2020/11/19
- [PATCH v2 00/16] Speeding up DEFVAR_PER_BUFFER, Spencer Baugh, 2020/11/21
- [PATCH v2 01/16] Add a test for let-binding unwinding, Spencer Baugh, 2020/11/21
- Re: [PATCH v2 01/16] Add a test for let-binding unwinding, Stefan Monnier, 2020/11/25