[wp-trac] [WordPress Trac] #57648: Major performance regression in `wp_enqueue_global_styles()` for classic themes

WordPress Trac noreply at wordpress.org
Wed Feb 8 13:10:50 UTC 2023


#57648: Major performance regression in `wp_enqueue_global_styles()` for classic
themes
--------------------------+--------------------------
 Reporter:  flixos90      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  high          |   Milestone:  6.2
Component:  Editor        |     Version:  trunk
 Severity:  major         |  Resolution:
 Keywords:                |     Focuses:  performance
--------------------------+--------------------------

Comment (by oandregal):

 As for the TTFB numbers I've collected: the experiment is simply loading
 the homepage and find the TTFB in the network tab within devtools. To
 scale to thousands of runs, I substitute the manual process (me looking
 into the devtools) by using curl and extracting the numbers.

 This is the whole step by step for TTFB anyone can reproduce (and, please,
 do!):

 - Go to the `.env` file in `wordpress-develop` and set the following env
 variables to `false`, so it's "production": `WP_DEBUG`, `WP_DEBUG_LOG`,
 `WP_DEBUG_DISPLAY`, `SCRIPT_DEBUG`.
 - Start the environment: `npm install && npm run build:dev && npm run
 env:start && npm run env:install`.
 - Run this command: `seq 1000 | xargs -Iz curl -o /dev/null -H 'Cache-
 Control: no-cache' -s -w "%{time_starttransfer}\n" http://localhost:8889 |
 xclip -selection clipboard`. It copies into the clipboard the result of
 loading 1000 times the homepage of the site. Paste those numbers to any
 spreadsheet. I've played with running 100 tests each time and waiting a
 bit (sometimes half a day) before doing the next bath, though it didn't
 affect much the numbers.

 If you (or anyone!) could use this method to compare 6.2 beta 1 and the
 6.1 branch, and then report what they have, it'd be much appreciated.

 Regarding the exact values: I don't give them any credit, I'm only
 interested in the ''variation'' between them. As you mention, the lab is
 not the same as the field. They are going to change machine-to-machine
 (they'd change using the same machine under different workload as well).
 However, something worth noting is that using curl, or the manual step, or
 the CI actions we push to codehealth all land in the same ballpark.


 For full disclosure, the TTFB method I shared results in low numbers for
 classic themes. This makes it difficult to find sub-millisecond
 regressions as they are lower than the noise/statistical error. However,
 you are reporting a +30% regression! The TTFB approach should have
 reported a noticeable -4ms being the base value 14ms.

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


More information about the wp-trac mailing list