- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Thu, 11 Oct 2012 13:26:33 -0400
- To: public-web-perf@w3.org
On 10/11/12 1:15 PM, Ilya Grigorik wrote: > First of all, I agree that the "first paint" is a highly contextual > metric - for one page, that may mean that the user can start reading the > content, for another it may mean an empty pixel on the screen. Or it can mean those two things for the same exact page, across two loads... > Having said that, I do think it is a useful metric and one that can > enable site owners to better optimize their resource loading: removing > blocking scripts, re-ordering CSS / JS, etc. This sounds more like a "first layout" kind of measurement than "first paint"... > There is a world of a > difference, when it comes to UX, between a page that paints the content > to the screen 0.5s in, and progressively fills in the content over next > 3 seconds, and a page that displays a blank screen for 3.5s and then > flushes the entire page to the screen. Yes, but there is also a world of difference between a page that paints the content 0.25s in and is done and a page that starts painting 0.020s in and then bounces around for the next 0.7s as it fills in things incrementally that would have been much faster to do all at once. This is one reason why Gecko actually throttles initial layout start (and hence obviously paint) for a bit, so there's more of a chance that subresources have come in and the page has stabilized some. One more thing: if you're seeing a blank screen (as opposed to the previous page), then first paint has already happened. It painted the blank screen. > *TL;DR:* In my opinion, time to first paint is definitely more than a > "feel good" metric. In fact, it is something we want to highlight to > site owners and developers and get them thinking about. OK. I agree that we want people to think about the issue of layout and painting being blocked on scripts. The hard bit for me is that the common user-perceived lag has to do with one of two things, as far as I can tell: 1) Layout not starting due to pending scripts/stylesheets. This has nothing to do with painting per se. 2) Layout starting but there not being anything to render because it's all generated via script onload or on DOMContentLoaded or is display:none until something happens. This would not be detected by a "first paint" metric, because the browser will happily paint a white viewport. -Boris
Received on Thursday, 11 October 2012 17:27:01 UTC