[lkml]   [1999]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: problems with large directories - not only ext2
Robert G. Brown wrote:
> (where seeks are much more expensive than sequential reads and
> where stating a few thousand files means MINIMALLY a few thousand seeks
> at 5-10 msec/each -- definitely macroscopic time). Note that this can
> easily take longer than the actual reading of the file(s).

Please note you don't _have_ to call stat() in the order returned by
readdir(). If you sort by inode number first, then on almost all
filesystems you'll get a speedup because that usually sorts the disk


-- Jamie

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:53    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean