[wp-trac] [WordPress Trac] #61734: Add the ability to handle "fetchpriority" to ES Modules and Import Maps
WordPress Trac
noreply at wordpress.org
Fri Nov 7 06:11:39 UTC 2025
#61734: Add the ability to handle "fetchpriority" to ES Modules and Import Maps
-------------------------------------+-------------------------------------
Reporter: dennysdionigi | Owner: westonruter
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.9
Component: Script Loader | Version: 6.5
Severity: minor | Resolution: fixed
Keywords: has-patch has-unit- | Focuses: javascript,
tests needs-dev-note | performance
-------------------------------------+-------------------------------------
Comment (by westonruter):
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/61734#comment:64>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list