Closed
Bug 822952
Opened 12 years ago
Closed 12 years ago
Avoid UpdateReadyState event queue traffic when the next frame status has not changed
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
FIXED
mozilla20
People
(Reporter: kinetik, Assigned: kinetik)
References
Details
Attachments
(1 file)
(deleted),
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
While in the debugger I noticed a large number of calls to nsHTMLMediaElement::ChangeReadyState via UpdateReadyStateForData hitting the early-exit path because the ready state was not changing. MediaDecoderStateMachine::UpdateReadyState is called from multiple places and dispatches an event each time, even if the state is unchanged. This can result in many events being created and dispatched during a single video frame.
With a simple current == last status early-exit path added to MediaDecoderStateMachine::UpdateReadyState, the number of events created and dispatched for a simple play-through of a 5 minute video drops from ~140,000 (~468/s or ~15/frame) to 3.
Assignee | ||
Comment 1•12 years ago
|
||
Tests pass locally. Try push: https://tbpl.mozilla.org/?tree=Try&rev=9c79c64b62d2
Attachment #693745 -
Flags: review?(roc)
Comment on attachment 693745 [details] [diff] [review]
patch v0
Review of attachment 693745 [details] [diff] [review]:
-----------------------------------------------------------------
Good catch
Attachment #693745 -
Flags: review?(roc) → review+
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 3•12 years ago
|
||
Keywords: checkin-needed
Comment 4•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in
before you can comment on or make changes to this bug.
Description
•