I'm working on scanning filesystems to build a file search engine and came over something interesting.
I can walk through 300 000 folders in ~19.5seconds with this command: ls -Ra | grep -e "./.*:" | sed "s/://" With find, it surprisingly takes ~50.5 seconds.: find . -type d My results are based on five runs of each command to warm up the disk cache. I've tried both this with both UFS and ZFS, and both filesystems shows the same speed difference. On a modern Linux distribution(Ubuntu 12.10 with EXT4), ls is just slight faster than find(about 15-20%). Are there a faster way to walk folders on FreeBSD? Are there some options(sysctl) I could tune to improve the performance? _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-performance To unsubscribe, send any mail to "[email protected]"
