Re: problems with large directories - not only ext2

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Thu, 12 Aug 1999 17:38:28 +0200


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
accesses.

[Plug: http://www.tantalophile.demon.co.uk/treescan/ANNOUNCE]

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/