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

WordPress Trac noreply at wordpress.org
Wed May 24 12:25:29 UTC 2023


#58394: Performance of wp_maybe_inline_styles
---------------------------+----------------------------
 Reporter:  spacedmonkey   |      Owner:  (none)
     Type:  enhancement    |     Status:  new
 Priority:  normal         |  Milestone:  Future Release
Component:  Script Loader  |    Version:  5.8
 Severity:  normal         |   Keywords:
  Focuses:  performance    |
---------------------------+----------------------------
 The function `wp_maybe_inline_styles` is called twice on templates. Hooked
 into `wp_head` and `wp_footer`. `wp_maybe_inline_styles` loops through all
 register styles to inlines them. But a the file operations, like
 `filesize` or `file_get_contents` can be expensive. On the first run,
 there should be some level or caching or flag set, to ensure that this
 function can be run multiple times without run the expensive file
 operations more than once.

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


More information about the wp-trac mailing list