Make WordPress Core


Ignore:
Timestamp:
11/11/2022 02:05:56 AM (11 months ago)
Author:
flixos90
Message:

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.

Location:
branches/6.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.