Closed Bug 1556568 Opened 5 years ago Closed 4 years ago

firstPaint metric is broken

Categories

(Core :: Web Painting, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox69 --- wontfix
firefox75 --- fixed

People

(Reporter: tnikkel, Assigned: tnikkel)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

See Bug 1546140 comment 28 and Bug 1546140 comment 33.

Summary: we get telemetry pings from sessions that look completely normal that have very large firstPaint times in the tens of hours. They don't seem to be randomly corrupted data because they are always less than the session length. We get a completely usable browser from disabling the painting code at the firstPaint call site and this isn't all that surprising given how painting works.

Matt, 1) does my analysis make sense? 2) where/how should we measure first paint?

Flags: needinfo?(matt.woodrow)

I think it does! It's not surprising that we don't run the code in nsViewManager::Refresh very often.

It's not entirely clear what firstPaint wants to measure, but I think PresShell::Paint (or nsViewManager::ProcessPendingUpdatesPaint) is pretty similar to what we have.

Alternatively we could try to measure when we get notification that we've actually composited, but I'm not sure we need to.

Flags: needinfo?(matt.woodrow)

(In reply to Matt Woodrow (:mattwoodrow) from comment #2)

It's not entirely clear what firstPaint wants to measure, but I think
PresShell::Paint (or nsViewManager::ProcessPendingUpdatesPaint) is pretty
similar to what we have.

Alternatively we could try to measure when we get notification that we've
actually composited, but I'm not sure we need to.

I think it is intended to record when we first paint something under "our" control (as opposed to an OS controlled background color or something) to the screen. So that would more closely correspond to the end of the first composite I think. Is there not likely to be much of a gap between PresShell::Paint and composite?

I'd expect ~16ms difference, assuming that we managed to paint fast enough.

Priority: -- → P2
Whiteboard: [qf]

Have patch, just validating that I get expected results locally and on try server.

Assignee: nobody → tnikkel

I don't think this needs any qf triaging. Looks like Timothy has this under control.

Whiteboard: [qf]

(In reply to Matt Woodrow (:mattwoodrow) from comment #4)

I'd expect ~16ms difference, assuming that we managed to paint fast enough.

I talked with Matt in person and convinced him we should measure after composite in case of a slow first composite.

Depends on: 1564915
Attachment #9076755 - Attachment description: Bug 1556568. Fix the first paint telemetry metric. r?mattwoodrow → Bug 1556568. Fix the first paint telemetry metric. r=mattwoodrow
Attached file data collection review
Attachment #9082859 - Flags: data-review?(chutten)
Comment on attachment 9082859 [details]
data collection review

DATA COLLECTION REVIEW RESPONSE:

    Is there or will there be documentation that describes the schema for the ultimate data set available publicly, complete and accurate?

Yes. This collection is Telemetry so is documented in its definitions file [Scalars.yaml](https://hg.mozilla.org/mozilla-central/file/tip/toolkit/components/telemetry/Scalars.yaml) and the [Probe Dictionary](https://telemetry.mozilla.org/probe-dictionary/).

    Is there a control mechanism that allows the user to turn the data collection on and off?

Yes. This collection is Telemetry so can be controlled through Firefox's Preferences.

    If the request is for permanent data collection, is there someone who will monitor the data over time?

Yes, Timothy Nikkel is responsible.

    Using the category system of data types on the Mozilla wiki, what collection type of data do the requested measurements fall under?

Category 1, Technical.

    Is the data collection request for default-on or default-off?

Default on for all channels.

    Does the instrumentation include the addition of any new identifiers?

No.

    Is the data collection covered by the existing Firefox privacy notice?

Yes.

    Does there need to be a check-in in the future to determine whether to renew the data?

No. This collection is permanent.

---
Result: datareview+
Attachment #9082859 - Flags: data-review?(chutten) → data-review+

Hey tn, any updates on this patch?

I kind of lost steam on this, I hope to circle back to this though.

Attachment #9076755 - Attachment description: Bug 1556568. Fix the first paint telemetry metric. r=mattwoodrow → Bug 1556568. Fix the first paint telemetry metric.
Pushed by tnikkel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cf99b713375c
Fix the first paint telemetry metric. r=mattwoodrow,chutten
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75

Took a quick look at the first batch of telemetry for this: so far it looks exactly what we would expect, broadly similar to first paint but with a much smaller proportion of values in the largest bucket. Simple measures firstpaint has 11.86% in the > 30 seconds bucket, Simple measures firstpaint has 0.81% in the same bucket.

I'll also want to look at the number of sessions that report first_paint vs first_paint2 (many sessions don't report first_paint because it's never called). Hopefully almost all sessions report first_paint2. As well as just look at the raw values of the two variables for many sessions to see how they track each other.

Looks like the first paint two measures have about 3% more results.

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

Attachment

General

Created:
Updated:
Size: