Gzip browser decompression skills / speed

What is the browser service data to decompress a gzip server response to a medium-sized web page?

<1ms 1-3ms? more?

+4
source share
2 answers

I assume you mean 1.3M uncompressed. I get about 6 ms decompression time on a single 2 GHz i7 core.

If I assume 1/3 compression, an additional 7 Mbps need to be transferred if not compressed. It takes more than 6 ms at 1 Gb / s. 700 ms with a more typical 10 Mbps connection.

gzip is a big win for HTTP transfers.

+6
source

Using the zlib implementation of gzip with default parameters.

On a server facing the Internet, the quad-core Xeon processor cpu 2.66Ghz, the gzip compression time is less than 0.5 ms to 15 KB. 361Kb is 4.50 ms, and 1077 kbps takes 13 ms

I believe that this is still easily worth it, since most of our traffic travels via Wi-Fi or 3G channels, so the transmission time far outweighs the server latency.

Time is measured using code bracketing only to call gzip routines and use nS precision timers, I changed the source to implement this. I measured this anyway, as I was trying to determine if gzip should be cached for in-memory compromises, or if gzip was fast enough anyway. In our case, I think that we will gzip all above 200 bytes and aggressively cache gzip'd responses, especially for larger packages.

(@Mark adler, thanks for writing zlib)

+3
source

Source: https://habr.com/ru/post/1483256/


All Articles