Need an api to analyze panning performance

RESOLVED FIXED in mozilla12

Status

()

Core
Graphics
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: (dormant account), Assigned: jrmuizel)

Tracking

(Blocks: 1 bug)

Trunk
mozilla12
x86
Windows 7
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

6 years ago
We need to Start() and Stop() a panning operation. Once stopped we should get a histogram of paint times.

Comment 1

6 years ago
Joel, this is the bug I mentioned where we were talking about a low level API to help measure panning for Fennec-native.

Updated

6 years ago
Blocks: 695448
would we need a separate bug for zooming?
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?
can we get this sample data?  we are building tools around this and it would be nice to work with some sample data.  Thanks!
(Assignee)

Comment 5

6 years ago
I'll try to get this working this week.
(Assignee)

Comment 6

6 years ago
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

6 years ago
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?
(Assignee)

Comment 8

6 years ago
(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.
(Reporter)

Updated

6 years ago
Blocks: 702509
(Assignee)

Comment 9

6 years ago
Created attachment 577793 [details] [diff] [review]
Add the api
Attachment #573273 - Attachment is obsolete: true
Attachment #577793 - Flags: feedback?(bgirard)
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.
Attachment #577793 - Flags: feedback?(bgirard) → feedback+
Blocks: 706251
No longer blocks: 706251
(Assignee)

Updated

6 years ago
Attachment #577793 - Flags: review?(ajuma)

Comment 11

6 years ago
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.
Attachment #577793 - Flags: review?(ajuma) → review+
https://hg.mozilla.org/mozilla-central/rev/90e2471b7a42
Assignee: nobody → jmuizelaar
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
You need to log in before you can comment on or make changes to this bug.