[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: |
Stefan Monnier |
Subject: |
Re: ido-switch-buffer is slow with many buffers; others are fast |
Date: |
Sun, 15 Nov 2020 10:15:34 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> 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!
Yup.
It affects all the vars defined via `DEFVAR_PER_BUFFER`.
> This explains the slow performance of let-binding case-fold-search
> that I mentioned in another branch of this thread.
Yes it's the source of that problem.
> Is this poor scaling of binding buffer locals a known problem?
At least since bug#41029, yes ;-)
> Has anyone worked on fixing this?
Not that I know, no.
It's a fairly tricky part of the code, but if you're interested, I'd be
very happy to help you along (I'm familiar with this code for having
reworked it somewhat around the time of Emacs-24).
Stefan
- 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, 2020/11/14
- Re: ido-switch-buffer is slow with many buffers; others are fast,
Stefan Monnier <=
- 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
- Re: [PATCH v2 01/16] Add a test for let-binding unwinding, Spencer Baugh, 2020/11/30