Skip to content

First paint time #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Diokuz opened this issue Jul 8, 2015 · 5 comments
Closed

First paint time #21

Diokuz opened this issue Jul 8, 2015 · 5 comments

Comments

@Diokuz
Copy link

Diokuz commented Jul 8, 2015

Hi there.

Im really surprised by absence of first paint time in the Navigation Timing 1/2.

Can you add new timing value for that? Its really important to know, when user see the first pixel of site (but not the white screen).

By the first paint time I mean (I suppose) the timestamp of visibilityState change from "hidden" to "visible". You also can see it as a green vertical line in Timeline of Chrome DevTools.

Thanks in advance!

PS: Why there is a something strange and useless like "prerenderSwitch" but no "renderSwitch" ?? http://www.w3.org/TR/navigation-timing-2/

@igrigorik
Copy link
Member

Can you add new timing value for that? Its really important to know, when user see the first pixel of site (but not the white screen).

The issue with first paint is that it's both hard to define and of dubious value as a metric. For some pages a white screen is a legitimate paint, while many others don't care about first pixel and want to track when particular elements become visible. Really, what you're after is "first meaningful paint", but we can't define this in the spec, since this varies for every site. As such, this is a wontfix for Navigation Timing.

That said, note that Frame Timing will allow you to track when paints happen, so if you want you can track first paint. In the future, with some of the Houdini pieces in place, we may be able to offer an even better solution.

@Diokuz
Copy link
Author

Diokuz commented Jul 8, 2015

I dont understand, why it is in DevTools, but cannot be in Navigation Timing?

Why you cant just add another timestamp of moment when visibilityState changing from "hidden" to "visible"?
Name it visibilityStateChange, or something like that, if you dont like term "first paint".

There are many services that measure render time for your site, but you cannot measure it by JS in browser...

dubious value as a metric

I want to know how many time user waits from "enter" click till he is able to see any content on my site.

@igrigorik
Copy link
Member

I dont understand, why it is in DevTools, but cannot be in Navigation Timing?

Just because it is in DevTools doesn't mean it's a good metric. Something like SpeedIndex would make a lot more sense, but that is subject to a lot of security concerns.

Why you cant just add another timestamp of moment when visibilityState changing from "hidden" to "visible"? Name it visibilityStateChange, or something like that, if you dont like term "first paint".

You can record it yourself already.

There are many services that measure render time for your site, but you cannot measure it by JS in browser...

I'm not saying that "rendering performance is not important". Rather, I'm pointing out that "first paint" is not sufficient, and we need a better solution. Some combination of Frame Timing, Visibility Observer, and Houdini will get us there, but it'll take some time.

@Diokuz
Copy link
Author

Diokuz commented Jul 8, 2015

Mkay. Thanks for answers.

Im disappointed because I make some "async css" improvements on our project right now, and I will not be able to prove strictly, that real users will be waiting much less time for the content...
I already have some beauty normal distributions of DOMContentLoaded times from over tens of thousands of users, but that "before" data goes nowhere, because I will not be able to collect another "after" data for comparison.

I hope the future is coming.

@plehegar
Copy link
Member

plehegar commented Jul 8, 2015

I agree with Ilya here. Frame timing should give you a finer grain metric regarding paint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants