You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My concern is that calculating the gzip size of each mapping in isolation misses out on compression savings from common patterns. I expect this means that --gzip overestimates the gzip size of each module. Though I'm not sure what mergeRanges does, perhaps it is grouping everything?
I expected this kind of issue. Getting 100% precise module gzip size seems almost impossible - a module is just part of a file. And gzip applies to the whole file. I still wonder what use of knowing the gzip size of a module when it's bundled with other modules.
Merging range purpose is to collect the biggest string that is part of a module. I haven't tested it enough but I think in most cases it should include the whole module code.
You can see actual bundle gzip size in totalBytes property
I still wonder what use of knowing the gzip size of a module when it's bundled with other modules.
Our specific use case is we want to minify the download time for a bundle. Because of gzip, a large JSON module is probably fewer bytes than an equivalently sized JS module. It's nice to get a rough sense (understanding that exact numbers are impossible) so that we know where to invest engineering effort.
Merging range purpose is to collect the biggest string that is part of a module. I haven't tested it enough but I think in most cases it should include the whole module code.
if this is true then I think this tool is close enough. I see a comment saying it combines continuous mappings of the same source - but I think mappings tend to be continuous for an entire module so that sounds good to me.
impl:
source-map-explorer/src/explore.ts
Lines 265 to 280 in f408a40
My concern is that calculating the gzip size of each mapping in isolation misses out on compression savings from common patterns. I expect this means that
--gzip
overestimates the gzip size of each module. Though I'm not sure whatmergeRanges
does, perhaps it is grouping everything?(came up in GoogleChrome/lighthouse#10476)
The text was updated successfully, but these errors were encountered: