[wp-trac] [WordPress Trac] #57789: Make theme.json related caches persistent

WordPress Trac noreply at wordpress.org
Mon May 20 09:49:34 UTC 2024


#57789: Make theme.json related caches persistent
-------------------------------------------------+-------------------------
 Reporter:  flixos90                             |       Owner:  joemcgill
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  6.6
Component:  Themes                               |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  gutenberg-merge has-patch needs-     |     Focuses:
  testing                                        |  performance
-------------------------------------------------+-------------------------

Comment (by thekt12):

 @joemcgill based on your comment
 https://wordpress.slack.com/archives/C02KGN5K076/p1714752083294029 I have
 investigated `WP_Theme_JSON::resolve_custom_css_format` and
 `WP_Theme_JSON::remove_keys_not_in_schema`.

 Both of the functions involve traversing the full tree, and both are doing
 it recursively.

 `resolve_custom_css_format` is fairly straightforward and there is little
 to no scope for improvement as all tree nodes must be visited and
 recursion seems to be the best option.

 `remove_keys_not_in_schema` is a bit more complex implementation but I
 couldn't find an easy way out. I was checking if some heuristic that can
 easily remove keys could be built, but so far no luck.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57789#comment:70>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list