Closed Bug 1457325 Opened 3 years ago Closed 3 years ago

Record and expose a timestamp after the parser finishes and the presentation is flushed

Categories

(Core :: DOM: Core & HTML, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: bholley, Assigned: bholley)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Tp6 currently uses time to first non-blank-paint, which is very non-deterministic - see bug 1455115 comment 3.

A potentially-more-reliable metric would be the end of the first style+layout+paint flush after DOMContentLoaded. I'm writing up a prototype for this, which we can then hook up to Talos.
I've only tested this lightly but it seems to work roughly as I'd expect.
Suggestions welcome.

MozReview-Commit-ID: E6QPjgfUKdo
Attachment #8971438 - Flags: superreview?(bzbarsky)
Attachment #8971438 - Flags: review?(mstange)
Note that tomorrow is my last day before heading out for a while, so quick turnaround would be appreciated.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=b61a58604a26613990696d56ca1657605ed9d8cc
Comment on attachment 8971438 [details] [diff] [review]
Expose time to DOMContentFlushed on the timeline. v1

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

This looks good to me. The "delete this;" part isn't very pretty but I don't have a better alternative.
Attachment #8971438 - Flags: review?(mstange) → review+
Comment on attachment 8971438 [details] [diff] [review]
Expose time to DOMContentFlushed on the timeline. v1

sr=me.  I'm on PTO tomorrow (Friday), and likely not checking email.....
Attachment #8971438 - Flags: superreview?(bzbarsky) → superreview+
(I thought people explicitly wanted to measure first non-blank paints, because that is what is relevant to users. But I guess having two different measurements is good.)
Priority: -- → P2
So, the post-refresh-observer setup ended up causing leaks, because the refresh driver can end up getting torn down, and it doesn't have any way to disconnect or drop the observer, which holds a strong reference to the presshell.

So instead I just implemented this directly in the refresh driver, which seems to work.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=9c58acb3565478caa98664c848693c3924b6d53d
MozReview-Commit-ID: E6QPjgfUKdo
Attachment #8971653 - Flags: review?(mstange)
Attachment #8971653 - Flags: review?(mstange) → review+
Pushed by bholley@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/560f881dffb8
Expose time to DOMContentFlushed on the timeline. r=bholley,r=mstange
NI sphilp to start tracking this metric in Talos.
Flags: needinfo?(sphilp)
https://hg.mozilla.org/mozilla-central/rev/560f881dffb8
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
See bug 1458242 for implementation in talos
Flags: needinfo?(sphilp)
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.