Closed Bug 1885671 Opened 8 months ago Closed 7 months ago

Move decoder module's initialization off the main thread

Categories

(Core :: Audio/Video, defect)

defect

Tracking

()

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

People

(Reporter: jrmuizel, Assigned: alwu)

References

(Regressed 1 open bug)

Details

Attachments

(3 files)

We call it the first time during GPUParent::RecvInit and then a second time in GPUParent::RecvUpdateVar.

https://share.firefox.dev/3IClfnt

Perhaps we can do the init async?

alwu, thoughts on how we could improve this?

Flags: needinfo?(alwu)
Blocks: mf-playback
Severity: -- → S3
No longer blocks: mf-playback
Severity: S3 → S2

I will make them unblock the startup.

Assignee: nobody → alwu
Flags: needinfo?(alwu)

Actually we already made the initialization async in GPUParent::RecvInit(), so it shouldn't block the start-up of the GPU process. How do you define a start-up process? Although the initialization still takes some time in GPUParent::RecvUpdateVar, UpdateVar is an async function so that it shouldn't really block the start-up as well (as no one expects the result of that function in order to finish the start-up).

Flags: needinfo?(jmuizelaar)
Flags: needinfo?(jmuizelaar)
Duplicate of this bug: 1889973
Blocks: 1880503
Pushed by alwu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/68ea681f466b run the method of getting codec supported on the background thread in order not to block the main thread. r=jrmuizel
Flags: needinfo?(alwu)
Flags: needinfo?(alwu)
Summary: WMFDecoderModule::Init blocks startup for 170ms → Move decoder module's initialization off the main thread
Pushed by alwu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1189be6d8d0e run the method of getting codec supported on the background thread in order not to block the main thread. r=jrmuizel https://hg.mozilla.org/integration/autoland/rev/0c53f738aa7f part2 : do not return a MediaFoundationInitializer if shutdown has already started. r=media-playback-reviewers,padenot

Backed out for causing Windows xpcshell assertion failures on ClearOnShutdown.cpp.

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: Assertion failure: false (ClearOnShutdown for phase that already was cleared), at /builds/worker/checkouts/gecko/xpcom/base/ClearOnShutdown.cpp:20
Flags: needinfo?(alwu)
Backout by sstanca@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/c715b8606805 Backed out 2 changesets for causing Windows xpcshell assertion failures on ClearOnShutdown.cpp. CLOSED TREE
Attachment #9394646 - Attachment description: Bug 1885671 - run the method of getting codec supported on the background thread in order not to block the main thread. → Bug 1885671 - part1 : run the method of getting codec supported on the background thread in order not to block the main thread.

This is used to fix the failures [1] on Windows xpcshell test on the try
server. As we've changed the timing of initailizing in previous patches,
that delays the timing of setting clean-up for MediaFoundationInitializer.

MediaFoundationInitializer has to be clean on MTA thread, but on the try
server, when the runnable for clean-up being dispatched on the main
thread, the MTA thread has been shutdowned.

Therefore, we would like to run the initialization earlier to ensure the
clean-up can be setup properly.

[1] https://treeherder.mozilla.org/logviewer?job_id=455059875&repo=autoland&lineNumber=2090

Depends on D207773

Flags: needinfo?(alwu)
Pushed by alwu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8444632ca3ad part1 : run the method of getting codec supported on the background thread in order not to block the main thread. r=jrmuizel https://hg.mozilla.org/integration/autoland/rev/883f7db28d01 part2 : do not return a MediaFoundationInitializer if shutdown has already started. r=media-playback-reviewers,padenot https://hg.mozilla.org/integration/autoland/rev/399ca207b66f part3 : initialize Media Foundation earlier for GPU process. r=media-playback-reviewers,padenot
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
Regressions: 1894281
See Also: → 1897636
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: