mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@54804 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -9,8 +9,9 @@
|
||||
* @since 5.8.0
|
||||
*
|
||||
* @group themes
|
||||
*
|
||||
* @covers WP_Theme_JSON
|
||||
*/
|
||||
|
||||
class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user