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

Misreporting aggregate script transfer size for repeated iframes loading same JS assets #10915

Open
westonruter opened this issue Jun 5, 2020 · 4 comments
Assignees
Labels
needs-investigation needs-priority PSI/LR PageSpeed Insights and Lightrider

Comments

@westonruter
Copy link

westonruter commented Jun 5, 2020

Provide the steps to reproduce

  1. Run LH on https://ma.tt or any other page that has multiple YouTube players on it.

What is the current behavior?

Lighthouse is reporting a transfer size of ~3MB for YouTube scripts on a page that has give YouTube player iframes on it:

image

Each iframe has about 600KB of script.

What is the expected behavior?

Since the 600KB of script is loaded 5 times, then only 600KB should be reported as the transfer size.

Environment Information

  • Affected Channels: PSI
  • Lighthouse version: 6.0.0
@brendankenny
Copy link
Member

brendankenny commented Jun 5, 2020

It looks like this may be a PSI/LR bug? (and/or correctly reporting what's really happening during PSI's load but bug in that it differs from how a local load would go)

I can repro in PSI, but see this correct-looking transfer size in CLI/DevTools:

Lighthouse third-party script results

And from the 'network-records' hidden audit, can confirm that there's 45 requests to a youtube origin but 34 of those have a transferSize of 0 because they're loading from cache.

@brendankenny brendankenny added the PSI/LR PageSpeed Insights and Lightrider label Jun 5, 2020
@brendankenny
Copy link
Member

Also from the main-thread blocking time column PSI vs my results, it seems like all the youtube iframes may be running in-process on PSI vs out of process locally?

@patrickhulce
Copy link
Collaborator

Maybe frames are the source of all those unexplained duplicate requests in PSI!

If PSI isn't aware of requests between frames I could certainly see that being the case.

@connorjclark
Copy link
Collaborator

prob same issue as #8990

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-investigation needs-priority PSI/LR PageSpeed Insights and Lightrider
7 participants