Skip to content

Instantly share code, notes, and snippets.

View jhadev's full-sized avatar

Josh A jhadev

View GitHub Profile

Story:

LCP is abnormally high and it is being called out as an h2 tag. After inspecting webpagetest json we can see that the LCP event fires multiple times. This lines up with page visibilty as the element in question is visible to the user well before the browser captures the final LCP.

https://www.webpagetest.org/result/220823_BiDcKW_AEJ/

As seen above LCP is captured at 1.9s and is identified as a text element. But it also fires again after hydration occurs and the DOMNodeId has been changed. This is the same issue that has been identified by Patrick Meenan here.

https://forums.webpagetest.org/t/lcp-varies-wildly-across-runs-with-no-code-difference/11701/9

@jhadev
jhadev / compare-har.json
Created July 19, 2022 19:42
compare-har.json
{
"har1": {
"url": "https://github.com/jhadev/har-test/blob/main/coach-plp-har-5-15.har",
"label": "Before any change 5-15",
"run": 1
},
"har2": {
"url": "https://github.com/jhadev/har-test/blob/main/coach-plp-har-6-13.har",
"label": "After 2 spikes 6-13",
"run": 1