emacs-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]