Removing DOM children where positional pseudo-classes are involved is really slow.
Categories
(Core :: CSS Parsing and Computation, defect, P2)
Tracking
()
Performance Impact | medium |
People
(Reporter: emilio, Unassigned)
References
(Depends on 1 open bug, Blocks 3 open bugs)
Details
(Keywords: perf:responsiveness, Whiteboard: [layout:backlog:quality])
Attachments
(1 file)
421 bytes,
text/html
|
Details |
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Comment 1•6 years ago
|
||
Comment 2•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Comment 4•6 years ago
|
||
--> categorizing as "responsiveness", given that this was from a dynamic-adding/removing-elements part of a benchmark (bug 1443066). And bumping to qf:p2 since qf:p1 is now reserved for pageload.
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Comment 5•6 years ago
|
||
(Just putting it further up in the ni? queue, sorry for the spam)
Updated•6 years ago
|
Updated•5 years ago
|
Updated•3 years ago
|
Updated•2 years ago
|
Reporter | ||
Comment 6•6 months ago
|
||
So I don't think bug 1899597 is great long-term... For the purposes of :nth-*
child, maybe we should try to defer invalidation until the next style flush... David, do you know if there's any :has()
style invalidation correctness issue that we could hit?
In any case it seems we should at least coalesce the sibling walking (even if that means removing the SlowSelectorLaterSiblings
stuff? not sure)
Comment 7•6 months ago
|
||
My initial concern was :has(:nth-child(..))
pushing up the restyle root, but :emilio pointed out to me that we already do something similar to it here. At least, it seems viable to hook into that mechanism for :has(:nth-child(...))
upwards invalidation.
Invalidating in RestyleManager
has been source of correctness/perf issues for :has()
as well, so this seems worth a shot.
Description
•