Daehee Han
Daehee Han

Reputation: 526

how much gzipping burdens the client?

I'm optimizing our web service, and heard about gzip.

It would be good if we can reduce the network load using gzip, but I'm a little worried about how much unpacking overhead it'll bring to client.

Especially, our service uses javascript very often - which means that page rending in web browser will cost CPU time.

I cannot sure that taking cpu time to decompress gzip packet (instead of taking care of javascript) would bring positive effect to our service still.

Upvotes: 1

Views: 122

Answers (1)

Michael Slade
Michael Slade

Reputation: 13877

Things like HTML and javascript libraries, particularly static files, are good candidates for compression. images aren't - they're already compressed.

Decompression of gzip compressed data is very fast compared to most internet connections - a quick test on my PC (AMD phenom 2.8GHz) results in decompression of about 170m/second, in a single core. So a ~200k javascript file would be decompressed by a modern browser on a modern PC in about 2 milliseconds, and javascript typically compresses to about 25% of its original size (~35% if it is already minified).

Of course, just what proportion of your network load is made up of decompressed javascript is another matter.

Upvotes: 1

Related Questions