Firefox's WebAudio context decodeAudioData() is very slow compared to Chrome's implementation
Categories
(Core :: Web Audio, defect, P3)
Tracking
()
People
(Reporter: naomiaro, Unassigned)
Details
(Keywords: perf)
Comment 1•10 years ago
|
||
Updated•10 years ago
|
Updated•10 years ago
|
Comment 2•10 years ago
|
||
Comment 3•10 years ago
|
||
Comment 4•10 years ago
|
||
Comment 5•8 years ago
|
||
Comment 6•6 years ago
|
||
We now are playing more of the files, we're only failing on f32 float compared to chrome (96 vs 97 played files):
Updated benchmark results:
- Firefox Nightly OSX, rdd disabled: 3671ms
- Firefox Nightly OSX, rdd enabled: 8379ms
- Chrome stable, OSX: 1193ms
This has been measured by summing the last column of https://chinpen.net/decodethis/:
sum = 0;
$$('td:last-child').forEach((e) => {
if (e.previousElementSibling.textContent == "Passed") {
sum += parseFloat(e.textContent);
}});
console.log(sum + "ms");
Still some work to do.
Comment 7•6 years ago
|
||
We're now down to 2047ms on the same machine, with the RDD enabled. Michael, that's expected with your recent changes right? Is there more coming?
Comment 8•6 years ago
|
||
With batch decoding landed in Bug 1568058 I would expect an improvement on webaudio that can be decoded on RDD. That is currently Vorbis, Opus, and WAV on macOS and Linux. Currently Windows isn't decoding audio on RDD, but pref-ing on Vorbis on RDD should be landing soon (hopefully today).
If you'd like to compare RDD w/ batch vs RDD w/o batch decoding, setting media.rdd-webaudio.batch.size to '1' will turn off batch decoding.
Using Nightly on my (ancient) MacPro, I get 15594ms vs 4609ms (batch off vs on).
Using a local build on my linux box, I get 14402ms vs 5649ms (batch off vs on).
For some additional test data, see https://bugzilla.mozilla.org/show_bug.cgi?id=1568058#c20.
I have plans to catch up Windows RDD audio decoding with macOS and Linux as long as we don't run into additional sandbox complications there. We should be moving additional audio formats to RDD decoding as well, with mp3 likely being the next candidate.
Updated•3 years ago
|
Description
•