[wp-trac] [WordPress Trac] #12009: Add support for HTML 5 "async" and "defer" attributes
WordPress Trac
noreply at wordpress.org
Fri Nov 7 06:11:39 UTC 2025
#12009: Add support for HTML 5 "async" and "defer" attributes
-------------------------------------------+--------------------------
Reporter: Otto42 | Owner: joemcgill
Type: enhancement | Status: closed
Priority: high | Milestone: 6.3
Component: Script Loader | Version: 4.6
Severity: normal | Resolution: fixed
Keywords: has-patch commit has-dev-note | Focuses: 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/12009#comment:169>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list