Bug 1313686 - Add opt-out Telemetry probe to see how long it takes for TabChild::RecvSetDocShellIsActive to paint a tab. data-review=liuche, r?billm
MozReview-Commit-ID: 5B588cs3cJ8
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -2444,16 +2444,17 @@ TabChild::RecvSetDocShellIsActive(const
// returns null if no content viewer exists yet.
if (nsCOMPtr<nsIPresShell> presShell = docShell->GetPresShell()) {
if (nsIFrame* root = presShell->FrameConstructor()->GetRootFrame()) {
FrameLayerBuilder::InvalidateAllLayersForFrame(
nsLayoutUtils::GetDisplayRootFrame(root));
root->SchedulePaint();
}
+ Telemetry::AutoTimer<Telemetry::TABCHILD_PAINT_TIME> timer;
// If we need to repaint, let's do that right away. No sense waiting until
// we get back to the event loop again. We suppress the display port so that
// we only paint what's visible. This ensures that the tab we're switching
// to paints as quickly as possible.
APZCCallbackHelper::SuppressDisplayport(true, presShell);
if (nsContentUtils::IsSafeToRunScript()) {
WebWidget()->PaintNowIfNeeded();
} else {
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -10409,10 +10409,20 @@
"HANDLE_BEFOREUNLOAD_MS": {
"alert_emails": ["kchen@mozilla.com"],
"expires_in_version": "55",
"kind": "exponential",
"high": 10000,
"n_buckets": 50,
"bug_numbers": [1301346],
"description": "The time spent handling beforeunload event in milliseconds. It measures all documents and subframes separately. If there are multiple handlers for the unload event in a document, this will record a single value across all handlers in the document."
+ },
+ "TABCHILD_PAINT_TIME": {
+ "alert_emails": ["mconley@mozilla.com"],
+ "bug_numbers": [1313686],
+ "expires_in_version": "56",
+ "kind": "exponential",
+ "high": 1000,
+ "n_buckets": 50,
+ "description": "Time spent painting the contents of a remote browser (ms).",
+ "releaseChannelCollection": "opt-out"
}
}