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: Michael Albinus
Subject: bug#66117: 30.0.50; `find-buffer-visiting' is slow when opening large number of buffers
Date: Tue, 26 Sep 2023 16:18:12 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Ihor Radchenko <yantar92@posteo.net> writes:

Hi Ihor,

>> With local files, it seems like insert-file-contents sets it.  So
>> maybe we should record the file name in the cache in bset_filename.
>
> Thanks for the pointer!
> AFAIU, the relevant code is
>
>       if (NILP (handler))
>       {
>         current_buffer->modtime = mtime;
>         current_buffer->modtime_size = st.st_size;
>         bset_filename (current_buffer, orig_filename);
>
> However, it looks like file handlers are responsible for setting the
> filename. So,
>
>        >   - ~tramp-handle-insert-file-contents~
>        >   - ~tramp-archive-handle-insert-file-contents~
>        >   - ~ange-ftp-insert-file-contents~
>        >   - ~jka-compr-insert-file-contents~
>        >   - ~mm-url-insert-file-contents~
>        >   - ~epa-file-insert-file-contents~
>
> may also need to handle the caching. And also all the third-party handlers.

That might be hard to synchronize. Why not fill the cache after that
code snippet? The handlers have already done their job, buffer-file-name
is set. And so does bset_filename in the local case.

Best regards, Michael.





reply via email to

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