bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#66117: 30.0.50; `find-buffer-visiting' is slow when opening large nu


From: Eli Zaretskii
Subject: bug#66117: 30.0.50; `find-buffer-visiting' is slow when opening large number of buffers
Date: Wed, 13 Dec 2023 16:58:09 +0200

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Ihor Radchenko <yantar92@posteo.net>,  dmitry@gutov.dev,
>   66117@debbugs.gnu.org
> Date: Wed, 13 Dec 2023 09:12:39 -0500
> 
> >> But it will only solve specific problem with `find-buffer-visiting' and
> >> we can always go for it if we cannot find anything better.
> > Which other popular functions need to loop through all the buffers in
> > Lisp?
> 
> Not sure why that matters.

Because if using the setq-local trick solves this problem, we could do
it in those other places as well.

> The performance problem comes from repeated
> uses of `(let ((case-fold-search ..)) ...)` where the repetition can be
> due to anything (not only enumerating buffers).
> 
> The "loop through buffers" happens when entering and leaving the `let`,
> because it has to `set/unset` the corresponding filed of the `struct
> buffer` of all the buffers whose `case-fold-search` is "global".

That's not the loop through buffers I had in mind.  I meant the loop
in find-buffer-visiting.





reply via email to

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