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

WordPress Trac noreply at wordpress.org
Fri Nov 11 02:06:12 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 fixed-      |     Focuses:
  major                                          |  performance
-------------------------------------------------+-------------------------
Changes (by flixos90):

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


Comment:

 In [changeset:"54805" 54805]:
 {{{
 #!CommitTicketReference repository="" revision="54805"
 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.
 Merges [54804] to the 6.1 branch.
 Fixes #56974.
 See #57067.
 }}}

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


More information about the wp-trac mailing list