Closed Bug 1457325 Opened 6 years ago Closed 6 years ago

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


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




Tracking Status
firefox61 --- fixed


(Reporter: bholley, Assigned: bholley)


(Blocks 1 open bug)



(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.
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.
MozReview-Commit-ID: E6QPjgfUKdo
Attachment #8971653 - Flags: review?(mstange)
Attachment #8971653 - Flags: review?(mstange) → review+
Pushed by
Expose time to DOMContentFlushed on the timeline. r=bholley,r=mstange
NI sphilp to start tracking this metric in Talos.
Flags: needinfo?(sphilp)
Closed: 6 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.