Closed Bug 1771718 Opened 2 years ago Closed 2 years ago

Tweak idle scheduling to support high frame rates better

Categories

(Core :: General, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
103 Branch
Tracking Status
relnote-firefox --- 103+
firefox103 --- fixed

People

(Reporter: smaug, Assigned: smaug)

References

Details

Attachments

(4 files)

No description provided.
Blocks: 1763839

This approach tweaks only the idle handling part. We may want to reduce the length of non-idle
slices too, but that is somewhat separate issue.

Depends on D147643

The limit without a separate timeout to guarantee the callback will be called eventually doesn't really work.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1763839#c8
And 5ms jank isn't too bad.

Depends on D147644

Attachment #9278733 - Attachment description: WIP: Bug 1771718, nsRefreshDriver::IsInHighRateMode(), r=mstange → Bug 1771718, nsRefreshDriver::IsInHighRateMode(), r=mstange
Attachment #9278734 - Attachment description: WIP: Bug 1771718, let idle period be shorter when frame rate is very high, r=farre → Bug 1771718, let idle period be shorter when frame rate is very high, r=farre
Attachment #9278735 - Attachment description: WIP: Bug 1771718, let GC and CC to use shorter (idle) slices when frame rate is high, r=jonco,mccr8 → Bug 1771718, let GC and CC to use shorter (idle) slices when frame rate is high, r=jonco,mccr8
Attachment #9278736 - Attachment description: WIP: Bug 1771718, remove idle time limit from SessionSaver.jsm, r=mconley → Bug 1771718, remove idle time limit from SessionSaver.jsm, r=mconley
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cea657e12ad1
nsRefreshDriver::IsInHighRateMode(), r=mstange
https://hg.mozilla.org/integration/autoland/rev/02f41c069f40
let idle period be shorter when frame rate is very high, r=farre
https://hg.mozilla.org/integration/autoland/rev/46c6d357568e
let GC and CC to use shorter (idle) slices when frame rate is high, r=jonco,mccr8
https://hg.mozilla.org/integration/autoland/rev/51dcf42bd3d7
remove idle time limit from SessionSaver.jsm, r=mconley
Blocks: 1764578

Is this worth putting into the 103 release notes, along the lines of "Improved performance on high-refresh rate monitors (140Hz+)"?

Flags: needinfo?(bugs)

I think the patch ended up affect 120+, but yes. Feedback in bug 1764578 was rather positive.

Release Note Request (optional, but appreciated)
Changes in this bug affect FF 103

[Why is this notable]:
Certain websites, like Youtube , use requestIdleCallback API and it didn't work too well with very high refresh rate monitors.
See also https://bugzilla.mozilla.org/show_bug.cgi?id=1764578#c23

[Affects Firefox for Android]:
If there are very high refresh rate Android devices and we expose that rate to the web, then yes...
I was told we do expose high refresh rates on Android too

[Suggested wording]:
"Improved performance on high-refresh rate monitors (120Hz+)"

[Links (documentation, blog post, etc)]:

Flags: needinfo?(bugs)

Note added to 103 nightly release notes.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: