scan through directory entries ordered by inode to reduce HD seeking (stat all entries together, then sort).
on a test fileset (with file cache on), this decreased time from just over 5 mins to 3.5 mins.