February 10, 2020 in Feedback
Suggestion for future IPS vertions.
Level 9 may be a bit of an issue as its more work for the client to decompress.
I've actually looked into this before, but the benefits you gain are microscopic. Like, really, really small. Fractions of a millisecond small.
Static resources are also only served once and then cached. Ideally, they're also served over a CDN, not your origin server. Dynamic pages are always compressed on-the-fly and account for most request traffic.
So it sounds like a nice idea and theory, but this is severe micro-optimization and not worth coding into the core software itself. Just use a good CDN like Cloudflare that will take care of doing this for you. Also, use Brotli if you can. Brotli > GZip.
In regards to compression level, using level 9 generally provides no benefit or further compression compares to level 6 and just increases CPU time for decompression as well as compression, so it's not worth using. 6 is the default and the best sweet spot from a practical standpoint.
If you use S3, we do actually pre-compress assets already...
@bfarber, why only for S3? I hope to see this available for any environment. Thanks.
In my experience benefits of this approach are huge for users with slow connection, especially mobile users.
It's been a long time since that was implemented and my memory can only hold so much. As I recall, the reasoning was that most server software (i.e. Apache) can handle dynamically gzipping content, but when you store a static asset on S3 it is served as-is, so we had to do it manually ourselves.
But apache and nginx could be easily configured to use pre-compressed files instead of dynamic gzipping, so i hope it will be changed. Thank you!
This topic is now archived and is closed to further replies.
Started 2 hours ago
Started 4 hours ago
Started November 29