Closed Bug 899801 Opened 7 years ago Closed 7 years ago

BrowserElementPanning's KineticPanning.momentums can have over 20,000 elements in it

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:leo+, firefox23 wontfix, firefox24 wontfix, firefox25 fixed, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 wontfix, b2g-v1.1hd fixed)

RESOLVED FIXED
1.1 QE5
blocking-b2g leo+
Tracking Status
firefox23 --- wontfix
firefox24 --- wontfix
firefox25 --- fixed
b2g18 --- fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- wontfix
b2g-v1.1hd --- fixed

People

(Reporter: mccr8, Assigned: justin.lebar+bug)

References

Details

(Whiteboard: [MemShrink][LeoVB+])

Attachments

(1 file)

In bug 898990, leo has a test that just opens an app every 10 seconds.  After doing this for 3 or 4 days, Olli noticed that KineticPanning.momentums from BrowserElementPanning has over 20,000 things in it.  This shouldn't cause long CC times, which is what that bug was about, but it still seems bad.
Summary: KineticPanning.momentums can have over 20,000 elements in it → BrowserElementPanning's KineticPanning.momentums can have over 20,000 elements in it
Assignee: nobody → justin.lebar+bug
I'm testing a patch.
Comment on attachment 783432 [details] [diff] [review]
Patch, v1: Don't keep more than five "momentums" values in BrowserElementPanning.js.

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

::: dom/browser-element/BrowserElementPanning.js
@@ +644,1 @@
>      momentums = momentums.slice(-kSamples);

I think that you don't need this shallow copy anymore if you ensure that momemtums.length <= kSamples in record().
Comment on attachment 783432 [details] [diff] [review]
Patch, v1: Don't keep more than five "momentums" values in BrowserElementPanning.js.

r+ with Fabrice suggestion.
Attachment #783432 - Flags: review?(21) → review+
Blocks a blocker.
blocking-b2g: --- → leo+
Whiteboard: [MemShrink] → [MemShrink][LeoVB+]
Apparently I forgot to mark this bug when it landed on the v1.1hd branch. My apologies.
https://hg.mozilla.org/releases/mozilla-b2g18_v1_1_0_hd/rev/90b792959f01
You need to log in before you can comment on or make changes to this bug.