I've recently set up a web service using static HTML pages. The number of HTML files in a single directory on the server's file system is about 12,000. I am not noticing any issues, but is this a potential error, or is it not a problem?
ls
perform a stat on every file name in the directory. And because of the way they interleave that with the calls to readdir() to read the directory, they destroy memory caches, causing horrible performance. So a lot depends on your web server software, how does it read the 12,000 files in that directory. My hunch would be that the web server will not attempt to do a directory listing (in the style of ls), unless you force it to (for example by having it serve a directory and create file listing, which apache can do).