Shopify / quilt

[⚠️ Deprecated] A loosely related set of packages for JavaScript/TypeScript projects at Shopify
MIT License
1.7k stars 220 forks source link

navigation_download_size has changed as of Chrome version 125 #2777

Open ryanwilsonperkin opened 6 months ago

ryanwilsonperkin commented 6 months ago

As of Chrome v125, the PerformanceResourceTiming entries that get emitted for JS assets that are loaded via dynamic import have changed from being "other" to being "script". This causes the totalDownloadSize method of Navigation under @shopify/performance to change.

As a result, applications that use dynamic imports for progressive loading of the page will appear to have increased download sizes from their previous values in Chrome v124.

These new values do appear to be more correct, as the previous ones excluded these values as "other", but this points to a need to have a better heuristic for matching script & style downloads during a navigation.

yoavweiss commented 6 months ago

Interesting! Doing some digging, this is the CL that changed that behavior. I agree the behavior is better. I'd love to chat about improving initiator type further, if that helps.