Skip to content
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

Excessive style recalcs caused by CSS usage tracking #15890

Closed
2 tasks done
Achchheweb opened this issue Mar 26, 2024 · 4 comments · Fixed by #15952
Closed
2 tasks done

Excessive style recalcs caused by CSS usage tracking #15890

Achchheweb opened this issue Mar 26, 2024 · 4 comments · Fixed by #15952
Assignees
Labels
Milestone

Comments

@Achchheweb
Copy link

FAQ

URL

https://www.anoblepurpose.com/

What happened?

Hi i'have update lighthouse version from 11.5 to 11.7 in this version i'm facing issue regarding low speed and full-screenshot.
Speed decrease from 35-25 and also full page screenshot of website not showing properly
My Site url:
https://www.anoblepurpose.com/

it properly working on 11.5 after i upgrade 11.7 them facing issue.
lighthouse v11.7 screenshot and speed
image
image

lighthouse 11.5
image
image

how can i resolve this issue suggest me.

What did you expect?

If i upgrade v11.5 to v11.7 then data should more details and taking full-page screenshot
image

What have you tried?

i just change with v11.7 to v11.5 then it work properly

How were you running Lighthouse?

node

Lighthouse Version

11.7

Chrome Version

114.0

Node Version

18.17

OS

Ubuntu 20.0

Relevant log output

Full page-screenshot and data should be optimized.
But score and screenshot not working properly.
@adamraine
Copy link
Member

Bisected to #15865. Will need to investigate further.

@adamraine
Copy link
Member

adamraine commented Mar 27, 2024

After investigation, there is a significant performance impact on the page if the CSS.enable is called before the navigation starts. This is the behavior that changed in #15865.

This trace calls CSS.enable before navigating, there are a significant number of style recalcs that affect page performance:
https://trace.cafe/t/5YOOKGSdbX

This trace calls CSS.enable after navigating:
https://trace.cafe/t/AKRGmaVZDD

I will file a bug in Chrome and confirm if this is expected behavior.

@adamraine
Copy link
Member

@adamraine adamraine changed the title Upgrade 11.7 & Full Screenshot Issue. showing initial loading icon only Excessive style recalcs caused by CSS usage tracking Mar 27, 2024
@adamraine
Copy link
Member

From the upstream issue:

This seems to be working as intended, since the instrumentation to track rule usage is quite involved.

Seems like CSS usage tracking has a significant performance overhead. Before #15865 we were deferring the CSS usage tracking until the end of the run. This prevented the performance overhead from affecting the actual page load, however it would only check what CSS was used at the end of the page load. So any styles that were temporarily used during the load would not get counted.

After #15865, temporarily used CSS rules are counted but this introduces the performance overhead visible in the reported site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants