[wp-trac] [WordPress Trac] #62261: Theme JSON: cached resolved URIs

WordPress Trac noreply at wordpress.org
Mon Oct 21 03:04:57 UTC 2024


#62261: Theme JSON: cached resolved URIs
-------------------------+-------------------------------------------------
 Reporter:  ramonopoly   |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  6.8
Component:  Themes       |    Version:
 Severity:  normal       |   Keywords:  has-patch has-unit-tests gutenberg-
  Focuses:               |  merge
-------------------------+-------------------------------------------------
 A ticket to track the syncing of Gutenberg PR:
 https://github.com/WordPress/gutenberg/pull/66155

 === What
 Implement "pretty basic caching" for resolved theme URIs in
 `WP_Theme_JSON_Resolver::get_resolved_theme_uris`.


 The intention to improve performance, even if slightly.

 `WP_Theme_JSON_Resolver::get_resolved_theme_uris`, and
 `WP_Theme_JSON_Resolver::resolve_theme_file_uris` which calls it, is fired
 multiple times in a single session to:

 1. Generate styles
 2. Deliver resolved URIs in a global styles controller response.


 Results will become more pronounced as other relative paths are
 introduced, e.g., [https://github.com/WordPress/gutenberg/pull/65019
 fonts], and more blocks support background images.

 Cached data is not be stored persistently across page loads.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62261>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list