jadjoubran / webdash-performance-budget

Monitor the total size of your production JavaScript files to maintain fast performance.
https://webdash.xyz/
0 stars 0 forks source link

Budget vs compressed size? - add Gzip support #3

Open cjsaylor opened 6 years ago

cjsaylor commented 6 years ago

Would it be possible to have the budget calculate the gzipped value? I assume most people serve their apps gzipped (I do from S3), and trying to estimate the uncompressed budget isn't ideal.

jadjoubran commented 6 years ago

Thanks for checking it out and opening an issue Chris! I do agree that gzipped would be useful GZip stats would make sense when taking into consideration however from a parse performance perspective, the size (after Gzip) of JavaScript that you're running in the browser matters a lot on Mobile So 500kb on JS on mobile is 500kb of JS (regardless of whether it was Gzipped or not), and as demonstrated in the article referenced below

1_8bq3bcyu1avvjwpr1x8yig

I think we'll have a gzip toggle that you can enable & disable, and I will try to get in touch with @addyosmani if possible to get a recommendation on the defaults as I'd love to make people more aware about the cost of JavaScript

Source: The Cost of JavaScript

cjsaylor commented 6 years ago

Good point, nice article info, thank!

jadjoubran commented 6 years ago

okay so I got a response! Let's go with 170KB gzipped as a default, and developers can customize the values So default is gzipped budget is 170kb (customizable) and rather than a toggle, we'll display the total size (non compressed)

jadjoubran commented 6 years ago

Source: Can You Afford It?: Real-world Web Performance Budgets

jadjoubran commented 6 years ago

will also add brotli support so we probably need a dropdown/toggle