Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'time to first paint' vs 'First Meaningful Paint'

Tags:

web

Is there a Web Performance section of SO?

Assuming not (I haven't found one) then what is the difference, if any, between time to first paint (https://developers.google.com/web/tools/chrome-devtools/evaluate-performance/timeline-tool) and First Meaningful Paint (https://developers.google.com/web/tools/lighthouse/audits/first-meaningful-paint)?

like image 623
Snowcrash Avatar asked Feb 13 '17 16:02

Snowcrash


People also ask

How is first Contentful paint different from first meaningful paint?

First contentful paint measures the time when the first visual dom element is painted on the canvas. First meaningful paint is the moment when "important" content is painted on the screen. Largest contentful paint measures the time at which the largest element above the fold is rendered.

How is first Contentful paint FCP different from the first meaningful paint FMP during a Web page render?

First Contentful Paint (FCP) and FMP are often the same when the first bit of content rendered on the page includes the content above the fold. However, these metrics can differ when, for example, there's content above the fold within an iframe.

What is time to first paint?

First Paint, part of the Paint Timing API, is the time between navigation and when the browser renders the first pixels to the screen, rendering anything that is visually different from the default background color of the body.


1 Answers

There are a few interesting paint times. The first one is

  • First Paint: The time when the first pixel is painted onto the screen. For example a background color of the page.
  • First Contentful Paint: The time when the first content piece from the DOM is painted, i.e. some text or an image.
  • First Meaningful Paint: The time when the browser paints the content that users are interested in. This is highly depends on the page.

The first two can actually be tracked by Chromes timing API and reported in Google Analytics for example.

The first meaningful paint (FMP) cannot be measured from browser APIs at the moment. The general idea when measuring the FMP would be to define Hero Elements, i.e. elements that make up the main user content, and measure their paint times. Currently there is no way to get the paint times of a specific element in the DOM

Tools like Lighthouse or WebPageTest estimate the FMP by taking the biggest layout change when rendering as the primary candidate.

like image 149
Erik Avatar answered Oct 22 '22 07:10

Erik