Last Comment Bug 696398 - Need an api to analyze panning performance
: Need an api to analyze panning performance
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: x86 Windows 7
: -- normal with 1 vote (vote)
: mozilla12
Assigned To: Jeff Muizelaar [:jrmuizel]
:
Mentors:
Depends on:
Blocks: 702509 native_droid_panning
  Show dependency treegraph
 
Reported: 2011-10-21 09:12 PDT by (dormant account)
Modified: 2012-12-23 08:35 PST (History)
12 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
A sketch of what this would look like (3.56 KB, patch)
2011-11-09 12:04 PST, Jeff Muizelaar [:jrmuizel]
no flags Details | Diff | Review
Add the api (4.85 KB, patch)
2011-11-29 16:31 PST, Jeff Muizelaar [:jrmuizel]
ajuma.bugzilla: review+
bgirard: feedback+
Details | Diff | Review

Description (dormant account) 2011-10-21 09:12:37 PDT
We need to Start() and Stop() a panning operation. Once stopped we should get a histogram of paint times.
Comment 1 cmtalbert 2011-10-24 21:22:12 PDT
Joel, this is the bug I mentioned where we were talking about a low level API to help measure panning for Fennec-native.
Comment 2 Joel Maher (:jmaher) 2011-10-25 06:34:58 PDT
would we need a separate bug for zooming?
Comment 3 Joel Maher (:jmaher) 2011-11-02 18:00:19 PDT
can I get an idea of what this API will look like and what I could expect from it?  Maybe just some example code of how to use it and some made up (yet moderately realistic) results?
Comment 4 Joel Maher (:jmaher) 2011-11-07 12:02:12 PST
can we get this sample data?  we are building tools around this and it would be nice to work with some sample data.  Thanks!
Comment 5 Jeff Muizelaar [:jrmuizel] 2011-11-07 13:34:58 PST
I'll try to get this working this week.
Comment 6 Jeff Muizelaar [:jrmuizel] 2011-11-09 12:04:01 PST
Created attachment 573273 [details] [diff] [review]
A sketch of what this would look like

This adds a startFrameTimeRecording() and stopFrameTimeRecording() to DOMWindowUtils. stopFrameTimeRecording() returns an array of frame times in milliseconds.
Comment 7 cmtalbert 2011-11-10 11:49:53 PST
I was talking with :pcwalton about this last night and he was worried that on birch, gecko might not have access to what's being drawn now as a result of the patch queue he landed last night (on birch).  Can you guys confirm whether or not that is the case?
Comment 8 Jeff Muizelaar [:jrmuizel] 2011-11-10 11:57:31 PST
(In reply to Clint Talbert ( :ctalbert ) from comment #7)
> I was talking with :pcwalton about this last night and he was worried that
> on birch, gecko might not have access to what's being drawn now as a result
> of the patch queue he landed last night (on birch).  Can you guys confirm
> whether or not that is the case?

Correct. Something like this API will need to be added to the Java UI.
Comment 9 Jeff Muizelaar [:jrmuizel] 2011-11-29 16:31:45 PST
Created attachment 577793 [details] [diff] [review]
Add the api
Comment 10 Benoit Girard (:BenWa) 2011-12-01 07:27:17 PST
Comment on attachment 577793 [details] [diff] [review]
Add the api

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

::: gfx/layers/Layers.cpp
@@ +576,5 @@
> +
> +nsTArray<float>
> +LayerManager::StopFrameTimeRecording()
> +{
> +  mLastFrameTime = TimeStamp();

I would add a comment about how 'TimeStamp()' is the "null" moment that you're using to mark that it's stopped.
Comment 11 Ali Juma [:ajuma] 2012-01-04 13:08:17 PST
Comment on attachment 577793 [details] [diff] [review]
Add the api

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

::: gfx/layers/Layers.cpp
@@ +570,5 @@
> +void
> +LayerManager::PostPresent()
> +{
> +  if (!mLastFrameTime.IsNull())
> +    mFrameTimes.AppendElement((TimeStamp::Now() - mLastFrameTime).ToMilliseconds());

Update mLastFrameTime here.
Comment 12 Ed Morley [:emorley] 2012-01-06 15:56:55 PST
https://hg.mozilla.org/mozilla-central/rev/90e2471b7a42

Note You need to log in before you can comment on or make changes to this bug.