Re: the correct way to read a big directory? Mutt?
On 2015-04-24 16:39:51 -0500, David Wright wrote:
> Well that's a relief. I was getting worried about there being some
> "magic" involved when you said you didn't use cacheing. So, looking
> back at https://lists.debian.org/debian-user/2015/04/msg01265.html ,
> "In which case, if you want to know how come mutt is so fast, take a
> look at the source. Just to mention one optimisation I would consider:
> slurp the directory and sort the entries by inode. Open the files in
> inode order.
When you said that, I didn't know that this was taken from Mutt (or
perhaps you suggested that without looking at the Mutt source?).
This is now done in my script, but I had to use the ReadDir module
from CPAN, since both readdir implementations in Perl (the standard
readdir Perl function and POSIX::readdir) just return the file name.
And this ReadDir module isn't available in a Debian package.
Vincent Lefèvre <email@example.com> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)