Avoid synchronous ReadFontList IPC message
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox76 | --- | fixed |
People
(Reporter: mstange, Assigned: jfkthame)
References
(Blocks 1 open bug)
Details
(Keywords: perf:pageload, Whiteboard: [fission-perf])
Attachments
(1 file)
Profile: https://perfht.ml/2vvhnTm (2ms profiling interval, GeckoView example on a Moto G5, remote debugging enabled)
During content process startup, the content process sends a synchronous IPC message ReadFontList
to the parent process. If the parent process happens to be busy at the time, this message can block the content process for an extended time - 450ms in this example.
We should try to eliminate this synchronous message.
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Yeah, this should be feasible: instead of having the content process "pull" the font list by sending a message to the parent (which potentially blocks for a long time, as here), we can make the parent "push" the list as part of the XPCOMProcessAttributes it passes when it starts the child. That's what we do on macOS and Linux (https://searchfox.org/mozilla-central/rev/c79c0d65a183d9d38676855f455a5c6a7f7dadd3/dom/ipc/ContentParent.cpp#2408-2409); we should rearrange the Android code to work the same way.
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
This should avoid the extra sync message.
(Markus, if you have a chance to try profiling this for comparison, there's a try build at https://treeherder.mozilla.org/#/jobs?repo=try&revision=2323b23e32532b3b553bbfb22098f6f98387f3f9.)
Reporter | ||
Comment 4•5 years ago
|
||
Works great! Thanks!
Before: https://perfht.ml/39wFgbM After: https://perfht.ml/2wzMkpp
(I applied the patch locally and didn't use the try build.)
Comment 6•5 years ago
|
||
bugherder |
Updated•3 years ago
|
Description
•