Closed Bug 852011 Opened 12 years ago Closed 12 years ago

Reserve 5 elements in TimeVarying::mChanges in order to avoid excessive cost when dealing with removals from it

Categories

(Core :: Web Audio, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Patch (v1) (obsolete) (deleted) — Splinter Review
In my testcase, we had at most 3 members in mChanges, but it's small enough that 5 should be a good guesstimate-based staring value. This eliminates about half of the nsTArray badness I was seeing.
Attachment #725985 - Flags: review?(roc)
Comment on attachment 725985 [details] [diff] [review] Patch (v1) Review of attachment 725985 [details] [diff] [review]: ----------------------------------------------------------------- ::: content/media/TimeVarying.h @@ +213,5 @@ > // The time at which the value changes to mValue > Time mTime; > T mValue; > }; > + nsAutoTArray<Entry, 5> mChanges; I'd prefer this parameter to be exposed as a parameter to the TimeVarying template so we can vary it by user.
Attachment #725985 - Flags: review?(roc) → review+
Comment on attachment 725985 [details] [diff] [review] Patch (v1) Review of attachment 725985 [details] [diff] [review]: ----------------------------------------------------------------- I guess I meant -
Attachment #725985 - Flags: review+ → review-
Please figure out which TimeVarying values actually need auto elements, and how many, and then attach patches to set those values here. Thanks.
It seems like most of the badness comes from the mBlocked member, we don't need to reserve storage for other TimeVarying's.
Attached patch Patch (v2) (deleted) — Splinter Review
Assignee: nobody → ehsan
Attachment #725985 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #726169 - Flags: review?(roc)
Comment on attachment 726169 [details] [diff] [review] Patch (v2) Review of attachment 726169 [details] [diff] [review]: ----------------------------------------------------------------- OK. The fact that we have entries in the mBlocking array indicates that we must be stuttering, which is really bad, so we need to fix it. Once we've fixed it we can probably put this back to zero.
Attachment #726169 - Flags: review?(roc) → review+
Yes, we are indeed stuttering...
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
Mass moving Web Audio bugs to the Web Audio component. Filter on duckityduck.
Component: Video/Audio → Web Audio
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: