[wp-trac] [WordPress Trac] #54221: _transient_dirsize_cache is set to autoload=yes and kills db performance if it grows (20MB in our case)
WordPress Trac
noreply at wordpress.org
Wed Sep 6 10:01:54 UTC 2023
#54221: _transient_dirsize_cache is set to autoload=yes and kills db performance if
it grows (20MB in our case)
------------------------------+------------------------------------------
Reporter: archon810 | Owner: spacedmonkey
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.4
Component: Database | Version: 2.8
Severity: major | Resolution: fixed
Keywords: has-patch commit | Focuses: administration, performance
------------------------------+------------------------------------------
Changes (by spacedmonkey):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"56522" 56522]:
{{{
#!CommitTicketReference repository="" revision="56522"
Database: Add expiration for `dirsize_cache` to transient to improve
performance.
The transient `dirsize_cache` stores an array of directory sizes. This
transient can grow very large, if the plugin directory has lots of sub
directories in it. For example, a site with 30 plugins, the transient was
around 2MB. For sites without a persistent object cache, transients
without an expiration, are stored in autoloaded options. This means this
option would load on every page request. Loading this option on every page
request when it is not used it wasteful. Adding a expiration to this
transient means it will not autoload. To ensure there is no degradation in
performance, the expiration was set to a generous 10-year timeframe,
making it highly unlikely to expire before it's refreshed.
Props nicomollet, spacedmonkey, flixos90, wpgurudev.
Fixes #54221.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54221#comment:53>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list