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: Dmitry Gutov
Subject: bug#66117: 30.0.50; `find-buffer-visiting' is slow when opening large number of buffers
Date: Tue, 26 Sep 2023 14:11:06 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 24/09/2023 15:50, Eli Zaretskii wrote:
... if not, these functions are not relevant
to the issue at hand.  If the search by truename_is_  significant, we
could cache that as well.
Just to make sure that we are on the same page: the cache I am proposing
should be complete - if a buffer is missing from the cache, we should be
sure that there is no matching buffer.
Since we will keep buffer-list (we must), even with this cache
available, we can always leave the current code that scans the buffer
list if the name is not in the cache.  This way, we don't need to
worry to have all the buffers in the cache, only those which are
looked for frequently and need the efficiency.

If the cache was exhaustive (i.e. we could guarantee that 'find-buffer-visiting' is always fast), we could use it in Xref as well. Instead of doing the memoization dance in xref--find-file-buffer which still doesn't account for symlinks.





reply via email to

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