Closed Bug 1665196 Opened 4 years ago Closed 4 years ago

Post-startup font loading causes 100ms jank

Categories

(Core :: Layout: Text and Fonts, defect)

defect

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox83 --- fixed

People

(Reporter: mstange, Assigned: jfkthame)

References

Details

(Keywords: perf)

Attachments

(1 file)

Profile: https://share.firefox.dev/35B3WRn

I encountered some jank while scrolling shortly after startup.

The chunk slice seems to be set to 100ms here: https://searchfox.org/mozilla-central/rev/30e70f2fe80c97bfbfcd975e68538cefd7f58b2a/gfx/thebes/gfxPlatformFontList.cpp#2106-2107

It might make sense to reduce this time and use IdleCallbacks for this work.

Is this different with gfx.font-list.shared=false?

Flags: needinfo?(jfkthame)

Is this different with gfx.font-list.shared=false?

I wouldn't expect it to be much different -- the font loader task exists in either case, and works in 100ms "chunks".

It might make sense to reduce this time and use IdleCallbacks for this work.

Yes, that seems like a potential improvement.

Flags: needinfo?(jfkthame)
Severity: -- → S3

I saw the same issue in a profile today: https://share.firefox.dev/3cTRnlS

Keywords: perf

I'm experimenting with a patch to perform this work in shorter slices on the main-thread Idle queue. I'll put up a patch for review if it looks like there's a worthwhile benefit.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cab81767be70
Use the main-thread idle queue rather than a repeating timer to finalize font loading. r=lsalzman
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a5e88ddf8867
Use the main-thread idle queue rather than a repeating timer to finalize font loading. r=lsalzman
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
Regressions: 1669007
Flags: needinfo?(jfkthame)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: