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

RootCauses Artifact is slow if there are lots of "SVG changed" invalidations #15869

Closed
2 tasks done
mattzeunert opened this issue Mar 20, 2024 · 3 comments
Closed
2 tasks done

Comments

@mattzeunert
Copy link
Contributor

mattzeunert commented Mar 20, 2024

FAQ

URL

https://lottiefiles.com/

What happened?

Run Lighthouse lighthouse https://lottiefiles.com/

The root causes gatherer takes 34 seconds

 LH:status Getting artifact: DevtoolsLog +7ms
  LH:status Getting artifact: Trace +0ms
  LH:status Getting artifact: RootCauses +0ms
  LH:status Getting artifact: Accessibility +34s
  LH:status Getting artifact: AnchorElements +670ms
  LH:status Getting artifact: ConsoleMessages +138ms

Counting the invalidations/prepaints:

{ eventsForLayoutInvalidation: 784184, prePaintEvents: 515 }

What did you expect?

I expected it to be faster.

What have you tried?

Some initial profiling on another lottie player site:

CleanShot 2024-03-20 at 12 23 39
CleanShot 2024-03-20 at 11 50 48
CleanShot 2024-03-20 at 11 52 08

How were you running Lighthouse?

CLI

Lighthouse Version

11.6.0

Chrome Version

No response

Node Version

No response

OS

No response

Relevant log output

No response

@adamraine
Copy link
Member

Definitely reproducible, looks like we are truing to get the node details of every layout invalidation node which is taking a while.

@adamraine adamraine added the P1.5 label Mar 20, 2024
copybara-service bot pushed a commit to ChromeDevTools/devtools-frontend that referenced this issue Mar 22, 2024
Lighthouse issue:
GoogleChrome/lighthouse#15869

Bug: None
Change-Id: I72b2a0be71f7f45cb522fc710577fb78b38c7963
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5384002
Reviewed-by: Paul Irish <paulirish@chromium.org>
Reviewed-by: Connor Clark <cjamcl@chromium.org>
Commit-Queue: Paul Irish <paulirish@chromium.org>
@adamraine
Copy link
Member

adamraine commented Mar 29, 2024

For me Lighthouse takes ~4 minutes locally on https://lottiefiles.com/
Some optimizations in the root causes engine helped get that down to ~2:45 (~2 min of which is spent in root causes)

We should continue to iterate on the performance of the root causes engine, but https://lottiefiles.com/ also contains a lot of invalidation tracking events (specifically iframe added to dom events) that the root causes engine has to sift through. We may want to limit the root causes engine somehow since it's results are helpful but not vital.

copybara-service bot pushed a commit to ChromeDevTools/devtools-frontend that referenced this issue Mar 29, 2024
Follow-up to:
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5384002

Lighthouse issue:
GoogleChrome/lighthouse#15869

Bug: None
Change-Id: I61bfd87e85955421d667a01c38212d64d5cc7e77
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5405255
Reviewed-by: Paul Irish <paulirish@chromium.org>
Reviewed-by: Connor Clark <cjamcl@chromium.org>
Commit-Queue: Adam Raine <asraine@chromium.org>
@adamraine adamraine assigned adamraine and unassigned connorjclark Apr 1, 2024
copybara-service bot pushed a commit to ChromeDevTools/devtools-frontend that referenced this issue Apr 5, 2024
The iframe root cause check casts a very wide net for events that
could have caused an iframe to be added. We are eventually going to drop
the CDP requirement for root causes, so it isn't worth it to make the
process more efficient.

Follow-up to:
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5384002

Lighthouse issue:
GoogleChrome/lighthouse#15869

Bug: 331429737
Change-Id: I68d51ac6b3ed8910ef0b032f885608baf04594b9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5421436
Reviewed-by: Paul Irish <paulirish@chromium.org>
Commit-Queue: Adam Raine <asraine@chromium.org>
@adamraine
Copy link
Member

The performance should of RootCauses should be much improved with #15926 released in LH 11.7.1.

It might be possible to improve performance further, but I expected us to overhaul the root causes engine in the near future so I think we can close this.

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

No branches or pull requests

3 participants