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: Sat, 30 Dec 2023 13:07:10 +0200

> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: dmitry@gutov.dev, 66117@debbugs.gnu.org, monnier@iro.umontreal.ca
> Date: Sat, 30 Dec 2023 10:39:49 +0000
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > I think at least part of the problem is in this fragment from
> > find-file-noselect:
> >
> >          ;; Find any buffer for a file that has same truename.
> >          (other (and (not buf)
> >                          (find-buffer-visiting
> >                           filename
> >                           ;; We want to filter out buffers that we've
> >                           ;; visited via symlinks and the like, where
> >                           ;; the symlink no longer exists.
> >                           (lambda (buffer)
> >                             (let ((file (buffer-local-value
> >                                          'buffer-file-name buffer)))
> >                               (and file (file-exists-p file))))))))
> 
> Not this one - (and file ...) will never trigger when file is nil.

Granted, that call to file-exists-p was not what I meant.

> I think I found the problem - it is rather silly.
> See the attached patch.

Thanks, installed.





reply via email to

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