Closed Bug 884632 Opened 7 years ago Closed 7 years ago

Optimize MediaStreamGraphImpl::PrepareUpdatesToMainThreadState in order to only include AudioNodeStreams that the main thread is interested in

Categories

(Core :: Web Audio, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: ehsan, Assigned: ehsan)

References

Details

Attachments

(1 file)

Attached patch Patch (v1)Splinter Review
See bug 882543 comment 7 and 14.  Note that we need to send the updates for source nodes as well in order to keep the ended event working.
Attachment #764489 - Flags: review?(roc)
This patch brings down the time to run the benchmark from about 40 seconds to about 16 seconds.
Comment on attachment 764489 [details] [diff] [review]
Patch (v1)

Review of attachment 764489 [details] [diff] [review]:
-----------------------------------------------------------------

This is OK. However, can't AudioNodeStream::MainThreadNeedsUpdates specialize for SOURCE_STREAMs and only return true if the stream has ended?
Attachment #764489 - Flags: review?(roc) → review+
(In reply to comment #2)
> Comment on attachment 764489 [details] [diff] [review]
>   --> https://bugzilla.mozilla.org/attachment.cgi?id=764489
> Patch (v1)
> 
> Review of attachment 764489 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> This is OK. However, can't AudioNodeStream::MainThreadNeedsUpdates specialize
> for SOURCE_STREAMs and only return true if the stream has ended?

Yes, good idea.
https://hg.mozilla.org/mozilla-central/rev/566ca9eb534e
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.