Long CC pauses from nsComputedDOMStyle with skippable mElement on www.sanwa.co.jp
Categories
(Core :: Cycle Collector, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox112 | --- | fixed |
People
(Reporter: mccr8, Assigned: mccr8)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
See my comments in bug 1814028. For some reason this page is creating absolutely huge numbers of nsComputedDOMStyle without wrappers where the element is skippable. We can start skipping it, because in this case the nsComputedDOMStyle has no outgoing edges so it can't be part of a cycle. This seems to really speed up the CC, though we still end up spending a long time in deferred finalization afterwards. My guess is that the page is keeping the elements alive, and then dumps them all at once.
Comment 1•3 years ago
|
||
Hmm, do you have a stack of where these are created? Generally the only thing we do with these objects is returning them to JS, so I'm surprised they don't have wrappers? Or has the wrapper been collected already somehow?
| Assignee | ||
Comment 2•3 years ago
|
||
At least one page creates a lot of these, and it really slows down the CC.
If the style has a black wrapper, that case is already covered
by the existing HasKnownLiveWrapper.
| Assignee | ||
Comment 3•3 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #1)
Hmm, do you have a stack of where these are created? Generally the only thing we do with these objects is returning them to JS, so I'm surprised they don't have wrappers? Or has the wrapper been collected already somehow?
I don't know. My guess is that the wrapper was already collected. I never noticed any GC in the profiles, though. In the test case, you rapidly check and uncheck an option box, which causes a big chunk of the page to change. My guess is that these style objects are associated with the part of the page that is being thrown out.
| Assignee | ||
Comment 4•3 years ago
|
||
The profile in bug 1814028 comment 0 does have lots of style-ish stuff in it, so maybe that will provide some insight.
Comment 6•3 years ago
|
||
| bugherder | ||
Comment 7•3 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #4)
The profile in bug 1814028 comment 0 does have lots of style-ish stuff in it, so maybe that will provide some insight.
If you filter on NS_NewComputedDOMStyle these all look to come through Window.getComputedStyle, so they should have had a wrapper at some point. CSSStyleDeclaration is marked as ProbablyShortLivingWrapper.
Comment 8•3 years ago
|
||
Yeah, the profile did show multiple minorGCs. And after that the objects should end up to deferred finalize list, with refcnt 1, but the relevant element can still be alive. So the patch should be rather effective here.
Description
•