[wp-trac] [WordPress Trac] #56945: Avoid running unnecessary expensive logic around theme.json parsing for classic themes
WordPress Trac
noreply at wordpress.org
Thu Nov 10 22:15:08 UTC 2022
#56945: Avoid running unnecessary expensive logic around theme.json parsing for
classic themes
--------------------------------------+-------------------------------
Reporter: flixos90 | Owner: flixos90
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.1.1
Component: Editor | Version: 6.1
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses: css, performance
--------------------------------------+-------------------------------
Changes (by flixos90):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"54799" 54799]:
{{{
#!CommitTicketReference repository="" revision="54799"
Editor: Avoid running certain logic around `theme.json` parsing
unnecessarily for classic themes.
Here's what it does:
* Do not load and parse `theme-i18n.json` schema if the theme does not
have a `theme.json` file.
* Fix the variable caching layer around the theme's `theme.json` parsing
so that a parent's theme `theme.json` is cached as well.
* Do not run a `WP_Query` for global styles for a user when the theme does
not have a `theme.json`.
In a basic WordPress setup, this changeset improves `wp_head` execution
time for classic themes by 10%, and overall response time for both block
themes and classic themes by 4%. This may seem like a small win, but 4%
reduced overall response time is actually quite a bit for one change, and
it is worth mentioning that this is just one of several other little
performance tweaks which are being worked on to improve performance of
`theme.json` parsing further.
Props flixos90, manuilov, oandregal, peterwilsoncc, spacedmonkey.
Fixes #56945.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56945#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list