[wp-trac] [WordPress Trac] #64194: 6.9 Fetch priority can add 10-20 seconds in page load time

WordPress Trac noreply at wordpress.org
Fri Nov 7 06:11:39 UTC 2025


#64194: 6.9 Fetch priority can add 10-20 seconds in page load time
----------------------------------------+--------------------------
 Reporter:  ciobanucatalin              |       Owner:  westonruter
     Type:  defect (bug)                |      Status:  closed
 Priority:  normal                      |   Milestone:  6.9
Component:  Script Loader               |     Version:  trunk
 Severity:  normal                      |  Resolution:  fixed
 Keywords:  has-patch needs-unit-tests  |     Focuses:  performance
----------------------------------------+--------------------------
Changes (by westonruter):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"61176" 61176]:
 {{{
 #!CommitTicketReference repository="" revision="61176"
 Script Loader: Guard against exponential recursion during calculation of
 loading strategy and fetchpriority.

 This addresses a performance issue in the recursive
 `WP_Scripts::get_highest_fetchpriority_with_dependents()` and
 `WP_Scripts::filter_eligible_strategies()` methods for redundant
 processing of shared dependencies in complex dependency graphs. To fix
 this, a `$stored_results` param is introduced which is passed by
 reference; this variable contains a cache of the calculated results for
 all scripts handles, so that subsequent calls for the same handle can
 return the cached value instead of re-computing it.

 Developed in https://github.com/WordPress/wordpress-develop/pull/10459

 Follow-up to [60704], [60931], [56033].

 Props ciobanucatalin, b1ink0, westonruter, mukesh27.
 See #61734, #12009.
 Fixes #64194.
 }}}

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


More information about the wp-trac mailing list