> There's also no ways to really make a file system faster when dealing with many small files and directories.
Depends on the file/directory structure. Traditionally back in the CGI days URI's were links to files on a server. They often still are for static files. If you know the path to a file then the lookup should be very fast.
But yeah any other type of index other then the path isn't really possible.