-
-
Notifications
You must be signed in to change notification settings - Fork 606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LCP takes much longer than all other metrics #3366
Comments
Hi @Icecold777 what did you see in the video/filmstrip? If I remember correctly there will be a screenshot in the filmstrip when the LCP happens. You can also check the metrics tab and go to the Largest Contentful Paint: Can that help you? |
Thanks, your answer is really helpful. It's MasterCard logo svg. But this element is not observed at measured page and there is no call for it when I check it manually in a browser. |
LCP uses Chrome Largest Contentful API to get that https://wicg.github.io/largest-contentful-paint/. Maybe the previous page hasn't finished loading yet before the next navigation starts and it somehow gets confused? I would check the wait before the next page load and see if that seems to work correct. |
a bit of context |
But its the same page load right, so the form is within the same navigation? Do you see the svg in the waterfall? |
I hope this piece of code should explain what I'm doing
|
Hi @Icecold777 if you are measuring and click on elements and load a new page I think its safer to use the clickAndWait command or add https://www.sitespeed.io/documentation/sitespeed.io/scripting/#waitbypagetocomplete so that the page finished loading before. you start to do the next thing? |
I'll try to wait but as I remember I began to wait for an element because PageComplete event is not fired and sitespeed crashed with OOM error. |
Ok, but then you are on the same page right, there's no navigation involved (just popups/frames) so the LCP is tide to the first navigation that happens. |
Run has executed correctly but commands.click.bySelectorAndWait doesn't help. That's the point, there is navigation as I wrote above I measure LCP for /confirmation page (page URL changes). But actually it's measured from the element located at /payment (page where I submit the form and start navigating to /confirmation). |
Looks like app issue because local API call returns irrelevant metrics |
API is quite unsrable and supports 'hard navigations' only. w3c/largest-contentful-paint#6 |
Hello,
sitespeed.io version 17.2.0 (issue is reproduced on older versions too).
During scripted e2e scenario I've faced the issue with LCP takes much longer than all other metrics
Please see the screens below.
I don't have any idea of the reason. Chrome trace finishes at 11 sec.
The text was updated successfully, but these errors were encountered: