[Webkit-unassigned] [Bug 226330] New: Shadow DOM unnecessarily invalidated on pseudo element change, causing CPU spikes
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu May 27 06:55:04 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=226330
Bug ID: 226330
Summary: Shadow DOM unnecessarily invalidated on pseudo element
change, causing CPU spikes
Product: WebKit
Version: Safari Technology Preview
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: CSS
Assignee: webkit-unassigned at lists.webkit.org
Reporter: ldebeasi at gmail.com
Created attachment 429874
--> https://bugs.webkit.org/attachment.cgi?id=429874&action=review
Code reproduction
This is a continuation of https://bugs.webkit.org/show_bug.cgi?id=222187 which was partially resolved in STP 125. When using Web Components inside of the Shadow DOM that have CSS Variables set on the host, there is a significant delay in response to clicks/touches. There were fixes in STP 125 that improved this issue, but I am still able to reproduce this issue in other ways.
Steps to reproduce:
1. Open code reproduction in STP 125.
2. Quickly click multiple times on the "Click Me" label (not the checkbox) and you should see Safari freeze up.
3. If you repeat step 2 while taking a Timeline sample, you should see the CPU usage spike significantly. In my tests I clicked about 4-5 times and saw the CPU spike to over 80% on average.
Expected Behavior:
I would expect Safari to not freeze up when quickly clicking the label multiple times.
Actual Behavior:
Safari freezes up when quickly clicking the label multiple times.
Other Info:
- As noted in https://bugs.webkit.org/show_bug.cgi?id=222187, the example I used is inherently heavy in shadow trees to emphasize the issue. Please see https://github.com/ionic-team/ionic-framework/issues/22951 for more "real world" examples of this impacting applications.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210527/be9a9f06/attachment.htm>
More information about the webkit-unassigned
mailing list