Make WordPress Core

Opened 21 months ago

Closed 9 months ago

#56912 closed enhancement (duplicate)

Improve autoloaded options

Reported by: spacedmonkey's profile spacedmonkey Owned by: mukesh27's profile mukesh27
Milestone: Priority: normal
Severity: normal Version:
Component: Options, Meta APIs Keywords: has-patch good-first-bug close
Focuses: performance Cc:

Description

Many options are autoloaded when WordPress is bootstrapped.

However, there are a number of options that are not automatically loaded. These include.

  • can_compress_scripts
  • medium_crop
  • medium_large_crop
  • large_crop
  • site_logo

These options should be updated to be automatically loaded.

Attachments (1)

Screenshot 2022-10-26 at 12.12.29.png (339.8 KB) - added by spacedmonkey 21 months ago.

Download all attachments as: .zip

Change History (18)

#1 @spacedmonkey
21 months ago

Maybe also think about WPLANG

This ticket was mentioned in PR #3534 on WordPress/wordpress-develop by @spacedmonkey.


21 months ago
#2

  • Keywords has-patch added; needs-patch removed

#3 @spacedmonkey
11 months ago

  • Resolution set to fixed
  • Status changed from new to closed

#4 @joemcgill
9 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Not sure if this is still worth doing, but the issue doesn't seem to have actually been fixed. Reopening for future consideration or to be closed with a different resolution.

#5 @flixos90
9 months ago

  • Milestone changed from Future Release to 6.5
  • Owner set to flixos90
  • Status changed from reopened to assigned

Moving this to 6.5 as this fits well into the continued focus on improving autoloading and is somewhat related to #39537.

This ticket was mentioned in Slack in #core-performance by mukeshpanchal27. View the logs.


9 months ago

#7 @mukesh27
9 months ago

  • Keywords good-first-bug added

@joemcgill commented on PR #3534:


9 months ago
#8

This was closed unintentionally due to a WP commit that fixed a Trac ticket with the same number as this PR.

#9 @mukesh27
9 months ago

  • Owner changed from flixos90 to mukesh27

I'm reassigning myself to update the PR with the new 6.4 function wp_set_option_autoload and changes.

This ticket was mentioned in PR #5594 on WordPress/wordpress-develop by @mukesh27.


9 months ago
#10

Trac ticket: https://core.trac.wordpress.org/ticket/56912

This PR includes setting the autoload attribute for certain options that were previously missing it. While in r55854, we already enabled autoload for the can_compress_scripts option, this PR extends that to include other missing options.

#11 @flixos90
9 months ago

  • Keywords close added

@spacedmonkey @mukesh27 Reviewing the list of options in the description, I'm not sure this ticket is still valid:

  • can_compress_scripts was already fixed in [55854] as you've stated above.
  • medium_crop does not exist. It is only mentioned in one core test. Only the thumbnail size as a thumbnail_crop option, the other sizes don't as far as I can tell.
  • medium_large_crop doesn't exist either, for the same reason.
  • large_crop doesn't exist either, for the same reason.
  • site_logo is already auto loaded as far as I can tell, and there is no code in core that would force it to not autoload. If you see it not being autoloaded, can you share more context?

I'm going to apply a close keyword here based on the above, but waiting for a reply first, to make sure I'm not missing something.

#12 @mukesh27
9 months ago

Thank you, @flixos90, for the detailed insights. The site_logo option will be added when someone uses a classic theme that supports Site Logo. For block themes, we have the Site Logo block that utilizes this option. In both cases, this option is autoloaded. I concur with your perspective that it's appropriate to close this ticket now. I look forward to hearing feedback from Jonny.

This ticket was mentioned in Slack in #core-performance by mukeshpanchal27. View the logs.


9 months ago

This ticket was mentioned in Slack in #core-performance by mukeshpanchal27. View the logs.


9 months ago

#15 @joemcgill
9 months ago

Per @spacedmonkey in our #core-performance chat today, "site icon is not auto-loaded and should be". @mukesh27 do you want to verify and work on a patch if so?

#16 @mukesh27
9 months ago

@joemcgill @flixos90, I have checked the site_icon option, and it appears to be auto-loaded as far as I can determine. Furthermore, there is no code in the core that would prevent it from auto-loading.

#17 @flixos90
9 months ago

  • Milestone 6.5 deleted
  • Resolution set to duplicate
  • Status changed from assigned to closed

Duplicate of #55270.

Thanks @mukesh27 for confirming. In that case, there is nothing left to do here, so I'm going to go ahead and close this as a duplicate.

Note: See TracTickets for help on using tickets.