Closed Bug 1726712 Opened 3 years ago Closed 3 years ago

USER_INACTIVE GCs can run while animating

Categories

(Core :: JavaScript: GC, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: pbone, Assigned: pbone)

References

Details

(Keywords: perf-alert)

Attachments

(2 files)

These GCs are scheduled only on user activity. However if the user sits back and watches some benchmark like motionmark or other thing where responsiveness is still important, it can jank during compacting. I propose to use both user activity and something like nsRefreshDriver to decide if it's a good idea to do these GCs.

Blocks: 1725539

That sounds bad. We should probably suppress these during animation if we have good heuristics to know when that's happening.

Severity: -- → N/A
Priority: -- → P2

I spoke with hiro who suggested some CSS animation heuristics. but it's not picking up drawing on a canvas element so I'm looking for that now. I'll also try to get in touch with someone who knows about media, I think media isn't an issue because it's handled on a different process, but I'd like to be sure.

Using nsRefreshDriver works for CSS animations, canvas drawing and WebGL (I think this also uses canvas).

Depends on Bug 1727960 for detecting if the refresh driver is ticking.

Depends on: 1727960
Pushed by pbone@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/12768301ed56
Only do a shrinking GC if we're not animating r=smaug
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch

== Change summary for alert #31176 (as of Mon, 06 Sep 2021 15:26:49 GMT) ==

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
38% facebook fnbpaint linux1804-64-shippable-qr warm webrender 319.54 -> 197.12
37% google-docs-canvas LastVisualChange linux1804-64-shippable-qr warm webrender 1,540.00 -> 976.67
14% google-docs-canvas fnbpaint linux1804-64-shippable-qr warm webrender 237.25 -> 203.88
14% google-docs-canvas PerceptualSpeedIndex linux1804-64-shippable-qr warm webrender 785.21 -> 677.83
3% amazon-sec fcp windows10-64-shippable-qr warm webrender 325.63 -> 316.29

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=31176

Backout by ccozmuta@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0bc9f1cd97de
Backed out changeset 12768301ed56 for depending on bug 1727960. CLOSED TREE

Backed out at dev request for depending on Bug 1727960. CLOSED TREE
Backout link : https://hg.mozilla.org/integration/autoland/rev/0bc9f1cd97de1a383880deb343856cc96c1488d6

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 93 Branch → ---
Pushed by pbone@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ac5731eb3f38
Provide nsRefreshDriver::IsRegularRateTimerTicking() r=smaug
https://hg.mozilla.org/integration/autoland/rev/34a06e03dd6e
Only do a shrinking GC if we're not animating r=smaug
Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch

(In reply to Cristian Tuns from comment #12)

Backout merged to central: https://hg.mozilla.org/mozilla-central/rev/0bc9f1cd97de

== Change summary for alert #31546 (as of Wed, 29 Sep 2021 11:44:23 GMT) ==

Regressions:

Ratio Test Platform Options Absolute values (old vs new)
5% buzzfeed dcf macosx1015-64-shippable-qr warm webrender 310.25 -> 324.92

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=31546

No longer depends on: 1727960
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: