Make WordPress Core

Opened 7 months ago

Closed 5 months ago

#57836 closed enhancement (duplicate)

Make `can_compress_scripts` option autoload.

Reported by: spacedmonkey's profile spacedmonkey Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.8
Component: Options, Meta APIs Keywords:
Focuses: performance Cc:

Description

The can_compress_scripts option is loaded in script_concat_settings function. This function is called on every page request. This option should be autoloaded, as it currently requests another database request to the option.

The reason why this option is not autoloaded, when the option is saved it calls update_site_option, which fallbacks to calling add_site_option and

$result = add_option( $option, $value, '', 'no' );

Change History (2)

#1 @adamsilverstein
6 months ago

This function is called on every page request. This option should be autoloaded, as it currently requests another database request to the option.

Makes sense to me, one less db query sounds good.

#2 @spacedmonkey
5 months ago

  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #55270.

Note: See TracTickets for help on using tickets.