[wp-trac] [WordPress Trac] #57814: Use `wp_theme_has_theme_json` in `_wp_theme_json_webfonts_handler`

WordPress Trac noreply at wordpress.org
Wed Mar 29 22:43:50 UTC 2023


#57814: Use `wp_theme_has_theme_json` in `_wp_theme_json_webfonts_handler`
------------------------------+---------------------------
 Reporter:  spacedmonkey      |       Owner:  spacedmonkey
     Type:  defect (bug)      |      Status:  assigned
 Priority:  normal            |   Milestone:  6.3
Component:  Script Loader     |     Version:  6.0
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:  performance
------------------------------+---------------------------
Changes (by flixos90):

 * keywords:  has-patch => has-patch commit
 * owner:  (none) => spacedmonkey
 * status:  new => assigned
 * milestone:  Awaiting Review => 6.3


Comment:

 I ran another benchmark with the changes from https://github.com/WordPress
 /wordpress-develop/pull/4185 applied to the WP 6.2 stable release
 codebase: https://docs.google.com/spreadsheets/d
 /1PmPKzvKLtN4_Zf8EG0VX0X8icZpzMz-k1yBaMdxaHow/edit

 I see a consistent improvement between 0.5-1ms in overall load time (`wp-
 total`) for classic themes, and together with the fact that running all
 this code conceptually is unnecessary for classic themes, I think this is
 good to commit. In absolute numbers that's little, but it comes to ~3% of
 the overall response time, which is quite a win for such a tiny change.

 The original PR has been closed, but it is a one line change that I
 approve, so marking this for commit.

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


More information about the wp-trac mailing list