On a windows OS (Server 2003, XP, Vista, Win7 etc.), is there a performance penalty for having too many files in a single folder?
- Will a folder scan become slower (when viewing the folder in windows explorer)?
- Will direct access become slower (copying a file in/out of this folder for example)?
- Is there a graph that show this speed correlation to number of files?
I noticed sometimes systems with large sets of files (log files etc.) will break the files into a hierarchy of folders, with each folder holding only a small set of items. Is there a technical benefit, or a scaling consideration behind this?
yes and no. the larger amount of files in a directory, the longer it takes to enumerate, and the more resources it takes to enumerate.
copy <full_path>\filename.ext <some other path>
then no it doesn't take any more time if you are doingcopy <full_path\filename.* <some other path>
then yes as you get the same hit as enumerating the direcotry.