[wp-trac] [WordPress Trac] #60518: Plugin Dependencies: Avoid unnecessary DB writes
WordPress Trac
noreply at wordpress.org
Mon Feb 12 20:28:44 UTC 2024
#60518: Plugin Dependencies: Avoid unnecessary DB writes
-----------------------------+--------------------
Reporter: joemcgill | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.5
Component: Upgrade/Install | Version:
Severity: normal | Keywords:
Focuses: |
-----------------------------+--------------------
The Plugin Dependencies feature adds additional DB queries to every
request by saving the list of dependencies that were deactivated to a new
transient, `wp_plugin_dependencies_deactivated_plugins` with an expiry
time of 10 seconds.
In most cases, when there are no plugins to deactivate, these extra DB
operations seem to be unnecessary. We could check whether the array is
empty in
`WP_Plugin_Dependencies::deactivate_dependents_with_unmet_dependencies`
and return early if we know there are no plugins that need to be disabled.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60518>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list