Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Filename generation: sorting by inode number
On 2015-04-24 18:01:09 -0700, Bart Schaefer wrote:
> On Apr 25, 2:17am, Vincent Lefevre wrote:
> } Subject: Filename generation: sorting by inode number
> }
> } With the "o" glob qualifier for filename generation, it is not possible
> } to sort by inode number. Such a feature could be very useful to speed up
> } file reading on an ext3 file system when the files are not in the cache.
>
> Hrm. Does the inode ordering also affect stat() times?
I've just done a test, and stat() in directory order is very fast on
ext3. I think that the reason is that inode information is grouped at
some specific place on the partition, and in a compact way I assume,
so that there are few blocks to read.
> This sounds less like something to expose as a sort ordering for the o/O
> qualifiers and more like something to hide under the covers, e.g., so
> that "oN" (unsorted) actually produces order by inode, instead of the
> apparently pseudo-random order of readdir().
I don't know. Perhaps unsorted (= directory order) may have an
advantage in some contexts (for some file systems).
> How close does "oc" get you to this?
It's difficult to say in practice. But in my case, many files are
often created on the same second (due to copies by block of files).
If the ctime resolution is the second, I fear that this won't solve
the problem.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - 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)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author