Create multiple subdirectories to improve performance

Created on 20 September 2018, about 6 years ago
Updated 24 June 2023, over 1 year ago

This has been reported by @claudiu.cristea in his review of the initial D8 port over at https://github.com/pfrenssen/filecache/pull/1#discussion_r218769008.

On some file systems the performance will drop if a folder contains a large number of files. For the moment we are storing all cache entries in a single cache bin folder. These might grow in the thousands to hundreds of thousands of files. We can mitigate this by splitting the files over multiple subfolders. A common technique is to split off the files into folders named after the first two letters of the filename. So a cache file named -liok7CIzl7I_Pm7v6Z1Hw1eid_UW0o_u-oGRKM7RRY would be placed in a folder named -l. This is a simple but effective way to spread out the files evenly over multiple folders.

✨ Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡§πŸ‡¬Bulgaria pfrenssen Sofia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024