GNU bug report logs - #66117
30.0.50; `find-buffer-visiting' is slow when opening large number of buffers

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> posteo.net>

Date: Wed, 20 Sep 2023 08:53:02 UTC

Severity: minor

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #115 received at 66117 <at> debbugs.gnu.org (full text, mbox):

From: Ihor Radchenko <yantar92 <at> posteo.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: dmitry <at> gutov.dev, 66117 <at> debbugs.gnu.org
Subject: Re: bug#66117: 30.0.50; `find-buffer-visiting' is slow when opening
 large number of buffers
Date: Sat, 07 Oct 2023 11:08:10 +0000
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Agree. That's what I was trying to do. However, one of the new primitives
>> will require searching a buffer with given value of `buffer-file-number'
>> - the variable not defined in C.
>
> buffer-file-number is defined as follows:
>
> 		    (file-attribute-file-identifier
>                      (file-attributes buffer-file-name)))
>
> whereas file-attribute-file-identifier is
>
>   (defsubst file-attribute-file-identifier (attributes)
> ...
>     (nthcdr 10 attributes))
>
> So in C this is:
>
>   list2 (INT_TO_INTEGER (s.st_ino), INT_TO_INTEGER (s.st_dev));

But how to get `s'? Do you mean that we should re-run `sys_fstat' on
every buffer? That's slow (query to FS), isn't it?

> I'd need to see measurements for that.  In any case, this is a
> separate issue.

Ok. I will look into it later and open a separate bug report if necessary.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




This bug report was last modified 1 year and 136 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.