Image files, cached files, etc. is it necessary to separate many folders? Many people say that a folder cannot contain more than 1000 pieces of information, otherwise it is a waste of resources;
I don't quite understand;
If the file is traversed, this may waste too much resources;
If a specific file path is given, it will not traverse, but read and modify it. is this a waste of resources?
My cache folder contains 10 million cached HTML files. using complex algorithms to separate multiple directories makes it difficult to make one folder contain no more than 1000 pieces of information. Instead, it is troublesome to manage.
Only modify, read, create, and delete cached files. the specific path. Will this affect the performance ?!
Reply to discussion (solution)
Not all cached files are frequently used. you only need to cache the required content. For more information about the number of files in a folder, it may be related to the disk's division of the file size. some of them do not remember. This means that if there are too many files to be wasted, a total of space will be wasted.
I don't think we need to consider the current hardware.
Some systems ?,? ? File ?? ? Is there a limit, and if the file ?? File? Multiple, list ?? Very slow.
View the file system.
Files in the same folder cannot be duplicated (files in different folders can be duplicated)
The characters that can be used as file names are limited, so the file name will become lengthy and the readability will decrease.
When accessing a file, the operating system needs to read the directory file first and find the location of the desired file in the hard disk in the directory file.
Obviously, the directory file is relatively small, and the time to find the file is relatively short.