[wp-trac] [WordPress Trac] #56974: Improve performance of the WP_Theme_JSON class

WordPress Trac noreply at wordpress.org
Fri Nov 11 01:48:19 UTC 2022


#56974: Improve performance of the WP_Theme_JSON class
--------------------------------------+--------------------------
 Reporter:  aristath                  |       Owner:  flixos90
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  6.1.1
Component:  Editor                    |     Version:  trunk
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:  performance
--------------------------------------+--------------------------
Changes (by flixos90):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"54804" 54804]:
 {{{
 #!CommitTicketReference repository="" revision="54804"
 Editor: Improve performance of `WP_Theme_JSON` class by reducing usage of
 expensive array functions.

 In many scenarios array functions are more expensive than using simpler
 `for` or `foreach` loops.

 This changeset results in roughly 4% faster `wp_head` execution time for
 both block themes and classic themes. While this may seem like a small
 win, it is a worthwhile enhancement and only one part of several other
 little performance tweaks which are being worked on to improve performance
 of `theme.json` parsing further.

 Props aristath, desrosj, jrf, spacedmonkey.
 Fixes #56974.
 See #57067.
 }}}

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


More information about the wp-trac mailing list