Better caching for get_dirsize
|Reported by:||batmoo||Owned by:|
In a multisite install, when trying to determine whether a site has exceeded its storage quota, WordPress will scan through a blog's upload directory and sum up the file sizes, by running filesize against each one. With a large number of files, this can significantly slow down the upload process or certain portions of the Dashboard.
get_dirsize has transient caching in place but this is a single cache entry for all folders. It might be better if WordPress has a separate cache entry for each folder and was invalidated based on context so that get_dirsize does not need to be run constantly on older, unchanged directories as frequently.
Change History (14)
comment:4 in reply to: ↑ description @kurtpayne — 4 years ago
- Cc kpayne@… added
- Type changed from defect (bug) to enhancement
comment:12 @jeremyfelt — 22 months ago
- Keywords close removed
- Milestone changed from Awaiting Review to Future Release
comment:13 @jeremyfelt — 20 months ago
- Component changed from Multisite to Filesystem
- Focuses multisite added