Excessive jank due to reading font info after startup
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox86 | --- | fixed |
People
(Reporter: jfkthame, Assigned: jfkthame, NeedInfo)
References
(Regressed 1 open bug)
Details
(Whiteboard: [bhr:gfxPlatformFontList::LoadFontInfo])
Attachments
(5 files)
See https://profiler.firefox.com/public/5mpr85tj7tkxb8mhz89rcp19e6x9arewrq46h7g.
This profile (from loading www.wikipedia.org in a newly-launched browser, IIUC) shows a lot of parent-process main-thread I/O that relates to loading font information. We should try to get this out of the startup path.
Assignee | ||
Comment 1•4 years ago
|
||
Bas, can you try the build from https://treeherder.mozilla.org/#/jobs?repo=try&revision=29e33675f3ea49bf4e4d173e47e3932fe7e2b26a and see if this makes a significant difference? It looks better in my local testing, but not sure how that'll compare to reference hardware.
Comment 2•4 years ago
|
||
Gerald, the profile in comment 0 is the profile you shared with the profiler team on Friday last week ("For your amusement and exploration, here's an all-threads profile with CPU and fileio, "shippable" win64 build taken on Acer ref laptop, cold-start after reboot, starting Firefox and then loading Wikipedia"). Any chance you can try the same thing with the build from comment 1?
Updated•4 years ago
|
Comment 4•4 years ago
|
||
Is the work that InitOtherFamilyNames
does something that must happen on the main thread?
(In reply to Florian Quèze [:florian] from comment #2)
... Any chance you can try the same thing with the build from comment 1?
Oops, I didn't read this properly, sorry. I built my own version, with the same patch that's in the build from comment 1, hopefully it's still useful.
Running my cold-start test on the Acer ref laptop: Boot, run firefox, wait 5s, go to wikipedia.
- Without patch: https://share.firefox.dev/3jI9tK8 (shippable build from https://treeherder.mozilla.org/#/jobs?repo=try&group_state=expanded&revision=87e3dfd1c0fc307f7ef8c951ba632cc1fce13341 )
- With patch: https://share.firefox.dev/36KOQJp (shippable build from https://treeherder.mozilla.org/#/jobs?repo=try&group_state=expanded&revision=1ba55155cd252873e5ffdeb71439da7402c56045 )
I'm seeing the same loads for ttf's 🤔 (But maybe I'm looking at the wrong thing?) Please let me know if I should try something else... Good luck!
Assignee | ||
Comment 6•4 years ago
|
||
Thanks! So the fonts still get loaded, but the impact of those loads should be somewhat mitigated... if I'm looking at the right thing, what I see in the profile without the patch is an 8.8s reflow in the content process that's loading wikipedia.org (Web Content 3/3), and during that time the main process has a 6.6s jank marker.
Looking at the profile from the patched build, the content-process reflow of wikipedia.org is now 4.9s (i.e. reduced by 45%), and the corresponding main-process jank is broken up into numerous small slices rather than a single multi-second block. That should make for a less severe impact on the user experience.
So I think this indicates a step in the right direction, at least (though of course it'd be good to go further if we can).
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 7•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 8•4 years ago
|
||
Depends on D96393
Assignee | ||
Comment 9•4 years ago
|
||
Depends on D96394
Assignee | ||
Comment 10•4 years ago
|
||
Depends on D96395
Assignee | ||
Comment 11•4 years ago
|
||
Depends on D96396
Comment 12•4 years ago
|
||
Hi Jonathan, do you have an update here? Is there anything which blocks landing the patches? All of them are reviewed meanwhile. Thanks.
Assignee | ||
Comment 13•4 years ago
|
||
I'm hoping to land these soon, after a final run through tryserver, but am (mostly) on PTO at the moment so things are kinda slow...
Comment 14•4 years ago
|
||
Comment 15•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/cdf7e5db79db
https://hg.mozilla.org/mozilla-central/rev/87186903dd5f
https://hg.mozilla.org/mozilla-central/rev/646176bf3689
https://hg.mozilla.org/mozilla-central/rev/bd13128f1eb8
https://hg.mozilla.org/mozilla-central/rev/08a9a27605c5
Description
•