[wp-trac] [WordPress Trac] #54677: Default widgets with alternative option name causing unnecessary database queries
WordPress Trac
noreply at wordpress.org
Fri Jul 22 05:22:54 UTC 2022
#54677: Default widgets with alternative option name causing unnecessary database
queries
-------------------------------------------------+-------------------------
Reporter: Chouby | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.1
Component: Widgets | Version: 5.8
Severity: normal | Resolution:
Keywords: has-patch needs-testing has-unit- | Focuses:
tests | performance
-------------------------------------------------+-------------------------
Comment (by peterwilsoncc):
At @spacedmonkey's suggestion I investigated using an upgrade routine
https://github.com/WordPress/wordpress-develop/pull/2951 the linked pull
request].
On a single site install the upgrade routine is pointless, as
`wp_widgets_init()` is run on the `init` hook and fires prior to the
redirect to the upgrade screen.
An upgrade routine may be beneficial for Multisite installs (I'm not sure
either way) but, given the options will be upgraded regardless, I am
inclined not to add one.
The presence of an upgrade routine causes a complete cache flush, so any
benefit to MS installs needs to be weighed against the impact for single
site installs.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54677#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list