Closed Bug 1055407 Opened 11 years ago Closed 11 years ago

Speed up frequently called GetLength() on SourceBufferResource

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: kinetik, Assigned: kinetik)

Details

Attachments

(1 file)

GetLength() is called fairly frequently and the existing implementation is O(n). It's simple to cache a logical length that's updated as new data is appended and return that.
Attachment #8474960 - Attachment description: Accumlate SBR length rather than recomputing on each call. → Accumulate SBR length rather than recomputing on each call.
Attachment #8474960 - Flags: review?(cajbir.bugzilla) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: