5 ms·
Nobody has mentioned the latency issue when gzipping. If you have to construct the whole file before gzipping, in situations where the file is large or dribbles
by bestes 18y ago
Nobody has mentioned the latency issue when gzipping. If you have to construct the whole file before gzipping, in situations where the file is large or dribbles out as the server processes the data, this could mean a significant slowdown.
In virtually all situations, I agree gzipping is good, just like I always leave write-caching on my hard drive turned on so that the slowest part of my system can run at the fastest possible speed. There just might be consequences you do not intend.
To address the obvious replies: yes, your server should not dribble out content. And, yes, if you are using a framework that spits out the entire page at once already, you will incur no additional latency on top of the gzip/gunzip time.
- tlrobinson 18y agoFor large static files you can cache pre-gzipped versions and use content negotiation to serve it to clients that support gzip.
- paul 18y agoIncorrect. Gzip streams just fine, so there is no latency issue. Google search, for example, writes the top of the page before the search is complete. (and I assure you, they use gzip)
- nostrademons 18y agoThanks for saying that - I was gonna pipe up but wasn't sure if it was public information. :-)
- bestes 17y agoI'm sure I had this problem before, but maybe it was with an older server or browser? In any case, thanks for the correction.