Closed Bug 621984 Opened 9 years ago Closed 9 years ago

replace mozRequestAnimationFrame() with mozRequestAnimationFrame(callback)

Categories

(Firefox for Android Graveyard :: Panning/Zooming, defect)

x86
Linux
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: romaxa, Assigned: mfinkle)

References

Details

(Keywords: perf)

Attachments

(1 file)

discussion on irc about scrolling performance related problems in fennec
**************************
23:16 < romaxa> roc: I'm not 100% sure yet and don't have enough profile data, but I've commented out this 
                http://hg.mozilla.org/mobile-browser/file/e600436e7e97/chrome/content/input.js#l390 ... do you think it is cheap to call 
                mozRequestAnimationFrame and addEventListener("MozBeforePaint") while scrolling?
23:17 < romaxa> roc:: and removing that give us ~2-3 FPS (56->59)
23:18 < roc> you should use mozRequestAnimationFrame(callback) instead of the event listener, that'd be faster
**************************
Blocks: 606672
Attached patch patchSplinter Review
Uses callback listener instead of events
Assignee: nobody → mark.finkle
Attachment #500800 - Flags: review?(21)
pushed:
http://hg.mozilla.org/mobile-browser/rev/27cd61374fac
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Keywords: perf
Not sure if there is any other way to verify this fix other than code inspection?
(In reply to comment #5)
> Not sure if there is any other way to verify this fix other than code
> inspection?

Probably not. I don't know if Tpan tests kinetic panning or not. Even so, we made the change because:
* Robert (roc) thought it would be faster. How much faster? we don't know.
* It's cleaner. We don't need to worry about removing the event listener.
would be nice to check Tpan results with commented out 
this._waitingForPaint = true
(In reply to comment #7)
> would be nice to check Tpan results with commented out 
> this._waitingForPaint = true

What does that do?
Is there a way to do the Tpan test locally?
Can somebody verify this please?
You need to log in before you can comment on or make changes to this bug.