Closed
Bug 800031
Opened 13 years ago
Closed 13 years ago
Include paint time in tab switch telemetry
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla19
Tracking | Status | |
---|---|---|
firefox18 | --- | fixed |
People
(Reporter: jrmuizel, Assigned: jrmuizel)
Details
(Whiteboard: [snappy])
Attachments
(1 file, 3 obsolete files)
8.37 KB,
patch
|
dao
:
review+
ehsan.akhgari
:
review+
akeybl
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
The current telemetry doesn't include paint time.
Assignee | ||
Comment 1•13 years ago
|
||
This will look something like this.
Assignee | ||
Updated•13 years ago
|
Whiteboard: [snappy]
Assignee | ||
Comment 2•13 years ago
|
||
Attachment #670030 -
Attachment is obsolete: true
Attachment #670038 -
Flags: review?(dao)
Attachment #670038 -
Flags: review?(bjacob)
Comment 3•13 years ago
|
||
Comment on attachment 670038 [details] [diff] [review]
A working version
>--- a/browser/base/content/tabbrowser.xml
>+++ b/browser/base/content/tabbrowser.xml
>@@ -831,18 +831,21 @@
> <method name="updateCurrentBrowser">
> <parameter name="aForceUpdate"/>
> <body>
> <![CDATA[
> var newBrowser = this.getBrowserAtIndex(this.tabContainer.selectedIndex);
> if (this.mCurrentBrowser == newBrowser && !aForceUpdate)
> return;
>
>- if (!aForceUpdate)
>+ if (!aForceUpdate) {
> TelemetryStopwatch.start("FX_TAB_SWITCH_UPDATE_MS");
>+ this.mCurrentBrowser.contentWindow.QueryInterface(Ci.nsIInterfaceRequestor).
>+ getInterface(Ci.nsIDOMWindowUtils).beginTabSwitch();
>+ }
Calling beginTabSwitch on the content window that's becoming inactive doesn't make much sense to me. this.mCurrentBrowser is the previously selected browser here, newBrowser is the new one.
Comment 4•13 years ago
|
||
Comment on attachment 670038 [details] [diff] [review]
A working version
Review of attachment 670038 [details] [diff] [review]:
-----------------------------------------------------------------
I only reviewed the gfx/ files. Not competent for other directories.
Even for that, I need an explanation about 'frame time recording':
::: gfx/layers/Layers.cpp
@@ +878,5 @@
> mLastFrameTime = now;
> }
> + if (!mTabSwitchStart.IsNull()) {
> + Telemetry::Accumulate(Telemetry::FX_TAB_SWITCH_TOTAL_MS,
> + int32_t((TimeStamp::Now() - mTabSwitchStart).ToMilliseconds()));
No need for this explicit int32_t cast. If a cast were needed, which it isn't AFAICS, that would be to uint32_t.
::: gfx/layers/basic/BasicLayerManager.cpp
@@ +589,5 @@
> PaintLayer(mTarget, mRoot, aCallback, aCallbackData, nullptr);
> if (mWidget) {
> FlashWidgetUpdateArea(mTarget);
> }
> + LayerManager::PostPresent();
Apparently PostPresent() is already used for "frame time recording". Explain to me how adding this call isn't going to change the results of frame time recording if it was enabled -- or how this change is wanted.
Attachment #670038 -
Flags: review?(bjacob) → review-
Assignee | ||
Comment 5•13 years ago
|
||
Attachment #670038 -
Attachment is obsolete: true
Attachment #670038 -
Flags: review?(dao)
Attachment #670044 -
Flags: review?(dao)
Attachment #670044 -
Flags: review?(bjacob)
Assignee | ||
Comment 6•13 years ago
|
||
(In reply to Benoit Jacob [:bjacob] from comment #4)
>
> No need for this explicit int32_t cast. If a cast were needed, which it
> isn't AFAICS, that would be to uint32_t.
Fixed.
> ::: gfx/layers/basic/BasicLayerManager.cpp
> @@ +589,5 @@
> > PaintLayer(mTarget, mRoot, aCallback, aCallbackData, nullptr);
> > if (mWidget) {
> > FlashWidgetUpdateArea(mTarget);
> > }
> > + LayerManager::PostPresent();
>
> Apparently PostPresent() is already used for "frame time recording". Explain
> to me how adding this call isn't going to change the results of frame time
> recording if it was enabled -- or how this change is wanted.
Previously, PostPresent wasn't called by the basic layer manager. This meant that frame time recording didn't work with that layer manager.
Assignee | ||
Comment 7•13 years ago
|
||
Addresses Benoit's comments and a comment to the idl and changes the uuid.
Attachment #670044 -
Attachment is obsolete: true
Attachment #670044 -
Flags: review?(dao)
Attachment #670044 -
Flags: review?(bjacob)
Attachment #670050 -
Flags: review?(ehsan)
Attachment #670050 -
Flags: review?(dao)
Comment 8•13 years ago
|
||
Comment on attachment 670050 [details] [diff] [review]
V3
Review of attachment 670050 [details] [diff] [review]:
-----------------------------------------------------------------
r=me on the domwindowutils dumpster. ;-)
Attachment #670050 -
Flags: review?(ehsan) → review+
Comment 9•13 years ago
|
||
Comment on attachment 670050 [details] [diff] [review]
V3
>+ newBrowser.contentWindow.QueryInterface(Ci.nsIInterfaceRequestor).
>+ getInterface(Ci.nsIDOMWindowUtils).beginTabSwitch();
formatting nit:
newBrowser.contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils).beginTabSwitch();
> "FX_TAB_SWITCH_UPDATE_MS": {
> "kind": "exponential",
> "high": "1000",
> "n_buckets": 20,
> "description": "Firefox: Time in ms spent updating UI in response to a tab switch"
> },
>+ "FX_TAB_SWITCH_TOTAL_MS": {
>+ "kind": "exponential",
>+ "high": "1000",
>+ "n_buckets": 20,
>+ "description": "Firefox: Time in ms spent updating UI in response to a tab switch"
>+ },
Can you add to the description that this includes painting time?
Should we get rid of FX_TAB_SWITCH_UPDATE_MS?
Attachment #670050 -
Flags: review?(dao) → review+
Comment 10•13 years ago
|
||
Assignee: nobody → jmuizelaar
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Comment 12•13 years ago
|
||
(In reply to Dão Gottwald [:dao] from comment #9)
> Should we get rid of FX_TAB_SWITCH_UPDATE_MS?
I think it's probably useful to have both numbers.
Assignee | ||
Comment 13•13 years ago
|
||
Comment on attachment 670050 [details] [diff] [review]
V3
[Approval Request Comment]
Bug caused by (feature/regressing bug #): We would like this so we can compare tab switch performance between 18 and 19.
User impact if declined: Minimal
Testing completed (on m-c, etc.): Has been on mozilla-central for about a wekk.
Risk to taking this patch (and alternatives if risky): There should be no behaviour change. The only things that came up during testing were an exception being caused by beginTabSwitch() this had very obvious side effects and shouldn't be happening at all anymore.
String or UUID changes made by this patch: None
Attachment #670050 -
Flags: approval-mozilla-aurora?
Updated•13 years ago
|
Attachment #670050 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee | ||
Comment 14•13 years ago
|
||
Updated•13 years ago
|
status-firefox18:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•