GMP initialization does main thread I/O at startup
Categories
(Core :: Audio/Video: GMP, enhancement, P3)
Tracking
()
| Performance Impact | medium |
People
(Reporter: aswan, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: perf:startup)
Attachments
(1 file)
When the addon manager starts up, GMP is initialized here-ish:
https://searchfox.org/mozilla-central/rev/465dbfe030dfec7756b9b523029e90d48dd5ecce/toolkit/mozapps/extensions/internal/GMPProvider.jsm#589
The first reference to the gmp service initializes it which leads to main thread I/O here:
https://searchfox.org/mozilla-central/rev/465dbfe030dfec7756b9b523029e90d48dd5ecce/dom/media/gmp/GMPServiceParent.cpp#217
Ideally we would defer all this work until at least after the first paint of the browser UI.
| Reporter | ||
Comment 1•7 years ago
|
||
Chris, I picked you at random from people who have touched GMP code recently. Is it feasible to delay GMP initialization as described above?
Comment 2•7 years ago
|
||
We can probably defer this to after first paint. It needs to happen before we start loading pages, as said pages may try to use GMPs, and fail if we've not initialized the GMPs.
Comment 3•7 years ago
|
||
Could we also move the I/O off main thread?
Comment 4•7 years ago
|
||
Chris, I made a guess at the priority here, I'll let you have a go at this if you feel it's important.
Updated•7 years ago
|
Updated•7 years ago
|
Comment 5•6 years ago
|
||
Updated•6 years ago
|
Comment 7•6 years ago
|
||
| bugherder | ||
Comment 8•6 years ago
|
||
Here is a startup profile on the 2018 ref hardware captured on today's Nightly. The view is zoomed to start at the end of the early blank paint, and stop after first paint of the browser UI (right before we initialize NSS) https://bit.ly/2ybWoWz
The load of GMPProviders.jsm is in this range, and the main thread I/O triggered by it is later within the range, when we start the Privileged Content process. Nothing changes on screen during this range, so re-ordering things inside it will have no user-impact.
Updated•6 years ago
|
Updated•5 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 9•4 years ago
|
||
It looks like this broke telemetry reporting of GMP addons. If we ask for the GMP addons before we've registered the GMP provider we'll come back empty handed.
Description
•