
Largest Contentful Paint - feross
https://web.dev/largest-contentful-paint/
======
deanclatworthy
Front end development is insane. Are there any other GUI implementations
across any other industry (native, embedded etc) that has to implement this
level of granularity and optimisation to make meaningful and responsive UIs?

As a developer I don’t want to have to optimise my code based on the first
meaningful paint, I don’t want to have to piss around to optimise my code
based on when the browser determines it needs to redraw and I don’t want to
have to understand how a browser rendering engine works and why. Does nobody
else realise this is insane levels of micro-optimisation? I used to think
being a front end developer only was a silly role as the skills are easily
learned. Now it’s so complicated, the top front end engineers should be
getting paid the same salaries as senior backend.

~~~
yoz-y
> As a developer I don’t want to have to optimise my code based on the first
> meaningful paint

You don't have to implement this anywhere, not even on web. This is only
because people making web frontends want to measure the performance to this
granularity.

The web is different from all other native frameworks in that it is highly
asynchronous: your text comes first, your images come later, css gets applied
somewhere in between, then come in the third party content (usually ads but
not necessarily, it could be embedded video for example).

> I used to think being a front end developer only was a silly role as the
> skills are easily learned. Now it’s so complicated, the top front end
> engineers should be getting paid the same salaries as senior backend.

Wow. Reading this I get the impression that you think that currently backend
engineers deserve more money intrinsically. Why? Depending on the program the
frontend might be way more important than the backend. Making good interfaces
_is_ complicated, even if the tooling would be perfect a good interface
requires a lot of thought.

<Rant> I've seen many threads and discussions dissing backends made by
'frontend devs' as if it were an insult. But please realize that frontends
made by devs unskilled in this domain are equally bad and prevent your
programs from being used by a lots of people. </Rant>

~~~
deanclatworthy
Regarding your last point, yes I used to believe backend engineers deserved
more pay.

Usually they had higher education, and were solving more complex problems with
all kinds of dependencies and integrations.

Frontend, 10 years ago, was about knowing jQuery, how to make an
XMLHttpRequest maybe, and a little bit of domain knowledge on browser bugs and
using floats to implement your layout. Back then you weren't even doing
responsive layouts on all projects. People usually filling these roles were
not required to have the same amount of domain knowledge as a backend engineer
- no way.

Nowadays it's a different kettle of fish. The tooling is insane. The
dependency tree is insane. The amount of granular optimisations and obscure
browser APIs you need to know to work on big-tech frontends is nuts.

So yes, I used to think this was the case. Not anymore.

~~~
J5892
I've definitely had to fight, as a frontend engineer, to prove that my job is
just as demanding (and in many cases more so) as any other engineer.

I have the education, knowledge, and problem solving skills required for
backend engineering; I just find the front end much more interesting. Building
a complex, intuitive user interface for an application/website is a huge
challenge.

------
stabbles
Largest Contentful Paint metric is otherwise known as the Time To First Accept
The Cookies Dialog Paint

~~~
stestagg
Or first time to Ad impression

------
Ajedi32
As the article notes, the largest element on the page isn't always going to be
the most important one. In the first example[1], I would actually consider the
page to be loaded by the second-to-last frame. In the second example[2] though
, I'd agree the page isn't fully loaded until the end, despite that being a
very similar situation to the first example.

Maybe a better metric would be something like "last DOM reflow" or something
along those lines? Usually I don't consider a page to be usable until its
content stops jumping around the screen.

[1]: [https://web.dev/largest-contentful-paint/lcp-cnn-
filmstrip.p...](https://web.dev/largest-contentful-paint/lcp-cnn-
filmstrip.png)

[2]: [https://web.dev/largest-contentful-paint/lcp-techcrunch-
film...](https://web.dev/largest-contentful-paint/lcp-techcrunch-
filmstrip.png)

~~~
cramforce
There is a new metric for that, too! [https://web.dev/layout-instability-
api](https://web.dev/layout-instability-api)

------
falsedan
This is a Google dev site, so it's heavily weighted to pushing Chrome and
features that may not be the best approach for small/medium businesses.

