Defer mozilla::widget::AudioSession::Start() until later in startup
Categories
(Core :: Widget: Win32, enhancement, P3)
Tracking
()
Performance Impact | medium |
People
(Reporter: florian, Unassigned)
References
(Blocks 2 open bugs)
Details
(Keywords: perf, perf:responsiveness, perf:startup, Whiteboard: tpi:+)
Attachments
(1 file)
4.53 MB,
application/x-7z-compressed
|
Details |
Updated•7 years ago
|
Comment 1•7 years ago
|
||
Comment 2•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Reporter | ||
Comment 3•7 years ago
|
||
Reporter | ||
Comment 4•7 years ago
|
||
Updated•7 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Comment 5•4 years ago
|
||
Comment 6•4 years ago
•
|
||
AudioSession::Start() is responsible for several DLL loads during startup. We should investigate the suggestion in comment #2 to see if it is possible to delay AudioSession::Start().
Comment 7•4 years ago
|
||
(In reply to Jim Mathies [:jimm] from comment #2)
Tricky since this has to be set up before a content process or plugin
process makes similar calls to sync up audio indicators. What we really want
to be able to do is delay this until audio is played. Chrome does this quite
well. However Flash may present an issue there since we aren't latched into
it. Some experimentation might yield positive but this isn't what I'd
consider low hanging fruit.
Can you help us understand what makes this tricky (other than Flash), and where an entry point into taking a look at this might be? Do you think it would be feasible for someone unfamiliar with this code to dive in and start solving it, or would it be so hairy that someone very familiar with our audio code would need to tackle it?
Comment 8•4 years ago
|
||
We remoted audio in https://bugzilla.mozilla.org/show_bug.cgi?id=1432303 so this might be simpler to do now. David, you did some work in audio init, any thoughts how easy it would be to delay initialization until audio is played? I wonder if we even need the init call down in widget anymore.
Comment 9•4 years ago
|
||
I removed the AudioSession from the content process when audio was remoted -- in bug 1430907. That leaves it in use for XPCShell (I don't know what that's about but I bet its unused) and the plugin process, which still needs it. OTOH, it does more than just consolidate the processes' volume controls -- it also sets the name/icon for Firefox that is used in sndvol.exe (the Windows volume mixer) [1]. We can probably delay until we either play a sound or load a plugin. The only thing I can imagine that breaking is if there is a volume slider created before we use sound -- which shouldn't be the case.
I'm certain I could find a place to ensure initialization before plugin activation but I'm not as well versed in the cubeb stuff so I'm not sure about that part.
Comment 10•4 years ago
|
||
For Reasons, I would love it if we could make it async by returning a MozPromise
too!
Updated•3 years ago
|
Reporter | ||
Updated•3 years ago
|
Updated•2 years ago
|
Description
•