[wp-trac] [WordPress Trac] #55270: Option can_compress_scripts not autoload causing extra DB query on every request
WordPress Trac
noreply at wordpress.org
Mon Apr 24 18:50:58 UTC 2023
#55270: Option can_compress_scripts not autoload causing extra DB query on every
request
---------------------------+------------------------------
Reporter: RavanH | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Script Loader | Version:
Severity: minor | Resolution:
Keywords: has-patch | Focuses: performance
---------------------------+------------------------------
Comment (by azaozz):
Actually thinking this functionality (the options and the code that sets
it) can now be removed. Detecting whether compression from PHP is
supported was necessary many years ago and was used when outputting
concatenated and compressed JS and CSS from `load-scripts.php` and `load-
styles.php`. As PHP based compression was removed there, the code that
detects it is unused.
Also looked if the option is used in themes/plugins. It is mentioned in
about 40 plugins but seems only used as a "default core option", not to
determine if compression from PHP is available. That's not surprising as
over the years output compression has moved to the server software as it
is more efficient.
In these terms thinning it would be better to (slightly) repurpose this
ticket and remove the code that wets the option too. Seems for back-compat
with the ~40 plugins the option can still be set to `false`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55270#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list