Open Bug 1430704 Opened 7 years ago Updated 2 years ago

Avoid calling cubeb from the main Gecko thread

Categories

(Core :: Audio/Video: cubeb, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: kinetik, Assigned: padenot)

References

Details

There are cubeb calls originating on the main Gecko thread that are a footgun in terms of performance (and are also making remoting even harder - see bug 1426867 comment 7). For example, creating an AudioContext results in a call to query the max channel count, which then initializes a cubeb context. Initializing a cubeb context has never been guaranteed to be a cheap operation (it could involve enumerating and initializing multiple OS backends, loading DSOs, connecting to sockets, etc.) and at a minimum we should avoid doing this from the main thread. I think we should add a warning that triggers if potentially-expensive cubeb APIs are invoked from the main Gecko thread, and then work through removing any of the cases where the warning is triggered.
Matthew, are you taking this one or should I ?
Flags: needinfo?(kinetik)
I don't mind taking it, but I won't have time to work on it until after the Windows remoting stuff, so it might be a while. If you've got free time, I'm happy for you to grab it instead.
Flags: needinfo?(kinetik)
Assignee: nobody → padenot
Rank: 20
Priority: -- → P3
Blocks: 1449555
Blocks: 1454782
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.