Picture files, cache files, etc., is it necessary to divide many folders?

Source: Internet
Author: User
See a lot of people say, a folder can not more than 1000 information, otherwise very wasteful resources;
I don't quite understand;
If you traverse the file, this may waste too much resources;
Is it a waste of resources given a specific file path, not traversed, read-only, and modified?

My cache folder has 10W cache html; It is difficult to do more than 1000 messages in 1 folders by using complex algorithms for many levels of directories. Instead the management is more troublesome.
To the cache file, only modify, read, create. Delete. The specific path. Will this also affect performance?!


Reply to discussion (solution)

Not all of the cache files are often used, you just cache that part of the necessary content is good, about a folder do not more than how many files, may be related to the disk on the file size division, I do not remember, meaning that if the file enough a waste a little It would be a waste of space to add up altogether.
Now the hardware facilities I think should not need to consider these things.

Some departments??? File? Is there a limitation, in addition if the file?? Files, more, list?? Very slow.

Look at the file system.

Files under the same folder cannot have duplicate names (files under different folders can have the same name)
The characters that can be used as filenames are limited, so filenames become verbose and readability decreases

When the operating system accesses the file, it needs to read the directory file and find the location of the desired file in the hard disk in the directory file.
Obviously when the directory file is small, the time to find the file is shorter

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.