What's sad with these tests is it takes 2m15s to read all the data in 71570 individual files, and only 15s to do it in 1 file. Granted there's a bit of overhead from the shell script looping, but not *that* much! I wonder how these tests would go on a different file system. I'm currently using reiserfs.
actually the loop adds a lot of overhead: These commands were run right in a row so there is some speedup due to cacheing, So I repeted test a few times. Admittedly, this is a small maildir.
bash-2.05b# ls | wc 1009 1009 75500
bash-2.05b# time for x in ls
; do cat $x > /dev/null ; done
real 0m3.670s user 0m0.347s sys 0m1.508s bash-2.05b# time cat * > /dev/null
real 0m0.497s
user 0m0.015s
sys 0m0.071s
bash-2.05b# time for x in ls
; do cat $x > /dev/null ; done
real 0m2.237s user 0m0.356s sys 0m1.435s bash-2.05b# time cat * > /dev/null
real 0m0.504s
user 0m0.001s
sys 0m0.086s
bash-2.05b# time for x in ls
; do cat $x > /dev/null ; done
real 0m2.415s user 0m0.356s sys 0m1.550s
-- Kenny Dail kend@amigo.net