aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/rtcerror.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2025-04-19 02:09:03 -0400
committerGitHub <noreply@github.com>2025-04-19 06:09:03 +0000
commit3ab5b8c4472129798b63cfb40b63ae672763b653 (patch)
tree1702e217a31111600f411ecedb8b4a21bb8c569e /components/script/dom/rtcerror.rs
parentc486c6f058ef9ac63e02fd42235e96db64744221 (diff)
downloadservo-3ab5b8c4472129798b63cfb40b63ae672763b653.tar.gz
servo-3ab5b8c4472129798b63cfb40b63ae672763b653.zip
script: Only register one image callback per CSS image in use. (#36612)
When layout encounters a CSS image, the script thread is responsible for fetching the image from the image cache. When the image is not yet available, the script thread creates image cache listeners to perform actions in response to future updates from the image cache. In the current implementation, a cache listener would iterate over all nodes using a particular image and mark them as dirty. However, we mistakenly added one cache listener per node, leading to n^2 runtime while performing lots of redundant work. For cases like #36480 with over 1000 elements using the same image, this led to a completely unresponsive script thread. Testing: Manual testing on the provided testcase, and a new WPT test that times out without this PR's changes. Fixes: #36480 Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Diffstat (limited to 'components/script/dom/rtcerror.rs')
0 files changed, 0 insertions, 0 deletions