GoogleChrome / GoogleChrome/lighthouse

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

Open
#16,107 2 comments 0 reactions 1 assignee Claimed by @brendankenny View on GitHub
docs P3
Dominant language
JavaScript
Stars
30.8k
Forks
9.8k
Avg merge
1d 14h
Merged PRs (30d)
20

Description

### FAQ

- [X] Yes, my issue is not about [variability](https://github.com/GoogleChrome/lighthouse/blob/main/docs/variability.md) or [throttling](https://github.com/GoogleChrome/lighthouse/blob/main/docs/throttling.md).
- [X] Yes, my issue is not about a specific accessibility audit (file with [axe-core](https://github.com/dequelabs/axe-core) instead).
- [X] Yes, my issue is not answered by [other FAQs](https://github.com/GoogleChrome/lighthouse#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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.