开发者

Does having a directory structure slow down file retrieval on a windows file system?

Say i have thousands of files. Is it better to have one folder to store the files or is it better to have sub folders?

What is b开发者_开发技巧etter for c# program to locate a retrieve files (from a performance pov)?

Thanks


I would imagine that if you always know the path to a file eg: path = (configuredRoot + path + filename) retreiving files should be the same for all paths. If you have to recursively search for files, having these in folders would obviously slow down the process of finding them.


Assuming that the path is known and a search of the directory contents is performed to find the next subdirectory/the desired file, using subdirectories would be more efficient from an asymptotic point of view, much the same way that binary search trees give results much faster than linked lists in the worst case scenario. I don't know if my assumption about the file system is correct, though.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜