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

Discrepancy between reported total and sum of resource transfer sizes in audits.resource-summary #16107

Open
3 tasks done
LarsFlieger opened this issue Jul 10, 2024 · 2 comments
Assignees

Comments

@LarsFlieger
Copy link

LarsFlieger commented Jul 10, 2024

FAQ

URL

https://restaurants.subway.com/de/deutschland/by/neu-ulm/bahnhofstra%C3%9Fe?utm_source=yxt-goog&utm_medium=local&utm_term=acq&utm_content=56358&utm_campaign=evergreen-2020&y_source=1_MTQ5MjcxODEtNzE1LWxvY2F0aW9uLndlYnNpdGU%3D, http://come-prima.eu/kontakt/

What happened?

I ran several Google Lighthouse Reports on different websites, and observed a discrepancy between the reported total transfer size and the sum of individual resource transfer sizes in the resource summary.

In general the transfer size and request count did not match the sum calculated by individual resources in 75% of all cases. (1059 correct, 4400 wrong)

I picked to websites to showcase the problem. In the first one it's wrong and the second one it's right.

For the first website (restaurants.subway.com):

  • Reported Total Transfer Size: 1,037,703 bytes
  • Sum of Individual Transfer Sizes: 1,404,185 bytes

For the second website (come-prima.eu):

  • Reported Total Transfer Size: 265,164 bytes
  • Sum of Individual Transfer Sizes: 265,164 bytes

Explanation of the Calculation:
To identify the discrepancy, I summed the transferSize values of all individual resource types (Script, Image, Font, Document, Other, Third-party) and compared this sum to the transferSize value labeled as "Total". The total transfer size should ideally be the sum of all individual resource types.

I uploaded the required part of the report here: https://gist.github.com/LarsFlieger/d3f91cbe5a3ac849be2a99a28a509574

This inconsistency suggests a potential issue in how the total transfer size is calculated or reported in some instances.

What did you expect?

I expected the total transfer size reported by Google Lighthouse to match the sum of the individual transfer sizes of all resources listed in the resource summary.

What have you tried?

To debug this issue, I:

  • Ran Lighthouse multiple times on the same websites to ensure the discrepancies were consistent.

How were you running Lighthouse?

PageSpeed Insights

Lighthouse Version

12.0.0

Chrome Version

No response

Node Version

No response

OS

No response

Relevant log output

No response

@LarsFlieger
Copy link
Author

LarsFlieger commented Jul 10, 2024

I have found out that the "third-party" resources are indeed added again as a separate metric and not included in the "total" transfer size. This clarifies the discrepancy I observed. I am closing this issue as it is now resolved.

@LarsFlieger
Copy link
Author

As a suggestion, it might be beneficial to either move the "third-party" resources out of the items array to a separate key or add a clear description in the audit explaining that "third-party" resources are not included in the "total" transfer size. This would make the report more intuitive and reduce potential confusion.

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

4 participants