[Webkit-unassigned] [Bug 226330] Shadow DOM unnecessarily invalidated on pseudo element change, causing CPU spikes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 23 10:03:31 PDT 2022


--- Comment #10 from zalan <zalan at apple.com> ---
(In reply to zalan from comment #8)
> I did a bit of profiling on this and it looks like (after the invalidation
> fix), this is simply about iterating over that massive amount of content
> when computing selection boundary. 
> The following, simple markup triggers this issue:
> <body>
> Click Me<input type="checkbox"><br>
>     <span></span>
>     <span></span>
>     <span></span>
>     <span></span>
>     <span></span>
> repeat it for a few thousands of times
> </body>
> It looks like VisibleSelection needs a more efficient way to figure out the
> selection end on user action (or in general for that matter).
However if there's any "non-visually empty" content somewhere e.g.

Click Me<input type="checkbox"><br>
     <span>!!!some text!!!</span>
 repeat it for a few thousand times

I don't see any spinning anymore. So this is about iterating over massive amount of _visually empty_ content (see nextVisuallyDistinctCandidate()).

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/20220623/2217b2d2/attachment-0001.htm>

More information about the webkit-unassigned mailing list