News for hackers. Stuff that matters.
Re:You can list a directory containing 8 million files But n... by Luyt on Tuesday August 16, 2011 @12:16AM (#2889868)
The author has a great tip for kernel/filesystem developers:

"Perhaps the buffer should be dynamically set based on the size of the directory entry file"

This would eliminate the readdir() bottleneck.

Re:You can list a directory containing 8 million files But n... by jharsman on Tuesday August 16, 2011 @03:04AM (#2890198)
readdir() is implemented in libc, not the kernel. The kernel interface is getdents() and that has a configurable buffer size.