LayerActivityTracker timers firing every 100ms forever on phabricator tabs
Categories
(Core :: Web Painting, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox98 | --- | fixed |
People
(Reporter: florian, Assigned: tnikkel)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
2.86 KB,
patch
|
Details | Diff | Splinter Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
See this profile: https://share.firefox.dev/3Knrefp
The 4 content processes included in the profile had phabricator tabs (eg https://phabricator.services.mozilla.com/D133599).
A quick look at the code gives me the impression that the LayerActivityTracker timer is expected to run 4 times before things get cleaned up, but it seems to run forever in these processes.
Assignee | ||
Comment 1•3 years ago
|
||
I tried to reproduce in a fresh profile and I was not able to. I logged in to my phab account in case that was needed. I put a printf when we called MarkUsed in the layer activity tracker and also checked the profile to see.
Reporter | ||
Comment 2•3 years ago
|
||
(In reply to Timothy Nikkel (:tnikkel) from comment #1)
I tried to reproduce in a fresh profile and I was not able to.
I just tried to reproduce on my local build, and couldn't.
In my normal Nightly where I captured the profile from comment 0, I captured another profile where I close a phabricator tab (that was the only time in the process), then reopen it (it opens in a new process) then close it again. We see the LayerActivityTracker runnable markers in the new process too.
https://share.firefox.dev/3nEKfAe
Something else that seems abnormal in the profile is that I have "Composite#1" markers at 60Hz in the Renderer thread on the parent process, despite nothing being animated or repainted. That seems like bug 1690673, but it may be related.
Assignee | ||
Comment 3•3 years ago
|
||
Assuming we keep hitting this line
I would debug why it's getting called.
Assignee | ||
Comment 4•3 years ago
|
||
Worked with Florian on this.
I think we are hitting this case
in NotifyExpired so the expiry tracker is never empty. And the reason mAnimatingScrollHandlerFrame is always alive and non-null is that it seems to only get cleared if the frame is destroyed of the scroll frame becomes inactive
Some scrollframes never become inactive (the root scroll frame, a scroll frame with will-change: scroll, if the root scroll frame isn't scrollable we give the first scrollable element we encounter a displayport and that will keep it active). So this seems to be a bug in the active layer tracker. We need to make sure these expire even if the scrollframe stays active. I'll have to think on what a proper fix is.
Reporter | ||
Comment 5•3 years ago
|
||
To debug this, I added debug profiler markers where Timothy told me they would help.
I was lucky enough to capture a profile where we see the beginning of the bug happening: https://share.firefox.dev/3rzudIW During this profile, we do 113 AddObject, 17 MarkUsed and 112 RemoveObject calls.
Apparently to reproduce this we need the page to do style changes from a scroll event handler, which is what we see happening in this profile.
Reporter | ||
Updated•3 years ago
|
Comment 6•3 years ago
|
||
Now that we have WR everywhere, we could just revert bug 1201330. I think that's the patch which introduced the code that's causing this bug.
Comment 7•3 years ago
|
||
I think these days, layer activeness is only used by the SVG layerization code.
Assignee | ||
Comment 8•3 years ago
|
||
This was added in bug 1201330 but with WR isn't really needed anymore and the code causes the expiration timer to fire until the scroll frame becomes inactive (the most common scroll frames stay active, ie root scroll frames).
Updated•3 years ago
|
Comment 10•3 years ago
|
||
bugherder |
Description
•