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: Fri, 22 Sep 2023 15:59:13 +0300

> Cc: 66117@debbugs.gnu.org
> From: Ihor Radchenko <yantar92@posteo.net>
> Date: Fri, 22 Sep 2023 15:41:01 +0300
> 
> Will it be acceptable to implement the cache using variable watchers?

I don't like us using variable watchers for such stuff.

Why cannot we just cache the correspondence between files and buffers
in some hash-table?

> The regression might happen when the number of buffers is small -
> when hash tables become slower compared to simple list lookup.
> But in such scenario, we will be talking about very small absolute
> runtimes anyway, so it should probably not matter in practice.

Alternatively, only create the hash-table when the number of buffers
exceeds some threshold.





reply via email to

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