Search code examples
javascripthtmlcsspagespeed-insights

Largest Contentful Paint is waiting for something unknown


My website https://www.rbfamily.nl/ is having trouble with google pagespeed and I have no idea why. The main bottleneck seems to be the LCP time, which google says takes between 7 and 11 seconds depending on the run.

As you can see in the waterfall, everything above the fold is loaded quickly and doesnt change afterwards. If I use the performance tab in chrome with network set to 3g and 4x slower CPU, it still loads everything above the fold under 2s. Looking at the "View original trace" in chrome with lightspeed, I dont see any changes to the website after a second.

I even tried without a background image, webfonts, scripts and no content below the fold, but it hardly changes the LCP time.

Can anybody tell me what pagespeed is waiting for, before it calls the LCP loaded?

Long time for LCP

UPDATE

I stripped everything down to the bare minimum except css. https://rbfamily.dego.dev/

I still get a red LCP score (2.9s) in lighthouse even though everything is drawn in the first frame of the waterfall.

2.9 without content


Solution

  • Can anybody tell me what pagespeed is waiting for, before it calls the LCP loaded?

    I get a similar time to Lighthouses prediction when running with "Fast 3G" and "4x CPU Slowdown". (There will be some discrepancy as Lighthouse uses simulated throttling).

    It is your hero image that is causing the LCP at 7 seconds (if it isn't clear from the image below the webp image called "homepagebg.jpg.webp" is the large green bar that finished loading just as you see the LCP entry).

    Performance timeline showing 7 second LCP

    Why am I getting different results to you?

    My guess is that on the "Network" tab you don't have "Disable Cache" checked so you are running the performance trace from a "warm cache".

    Screenshot showing location of disable cache checkbox

    You have to bear in mind that Lighthouse always runs as if it was the first visit to a page unless explicitly told not to (using the Lighthouse CLI, or by unchecking the "clear storage" checkbox on the Lighthouse Tab) so doesn't have any cached images, files etc.

    Location of Clear Storage Checkbox on the Lighthouse Tab

    With the image cached I get a 2 second LCP like you are experiencing.

    How can I make the performance profile match what Lighthouse sees?

    You may find this answer on how to run Lighthouse in the browser and make it match the performance profile if you view the trace useful.