[wp-trac] [WordPress Trac] #58394: Performance of wp_maybe_inline_styles

WordPress Trac noreply at wordpress.org
Thu May 25 19:04:28 UTC 2023


#58394: Performance of wp_maybe_inline_styles
---------------------------+---------------------------
 Reporter:  spacedmonkey   |       Owner:  spacedmonkey
     Type:  enhancement    |      Status:  assigned
 Priority:  normal         |   Milestone:  6.3
Component:  Script Loader  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |     Focuses:  performance
---------------------------+---------------------------
Changes (by flixos90):

 * owner:  (none) => spacedmonkey
 * status:  new => assigned
 * version:  5.8 =>
 * milestone:  Future Release => 6.3


Comment:

 This is an excellent find!

 I just conducted a benchmark for both TT3 (block theme) and TT1 (classic
 theme), and can report that there is definitely a notable impact on
 performance for both of them, even classic themes:

 * For TT3, `wp-template` is ~21% faster, making overall response time ~7%
 faster.
 * For TT1, `wp-template` is ~5% faster, making overall response time ~2%
 faster.

 That all makes sense, given that classic themes don't rely on the affected
 logic as heavily, e.g. don't commonly have stylesheets without a `$src`
 enqueued. Still, even there the changes of caching the file size brings a
 performance benefit that is clear to see in the data.

 [https://docs.google.com/spreadsheets/d/1o8WHr6el76GUKLqj8Gx2a7YfvyD-
 773U7R-v861yfUg/edit Here are the full results.]

 Given this is a major performance win, I'll milestone this for 6.3.

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


More information about the wp-trac mailing list