Hacker News new | ask | show | jobs
by mmohebbi 4403 days ago
Thanks!

We support gzip on the api json response for clients that support it. Given that, I'd expect the size improvements would be minimal for whitespace stripping but let us know if you have evidence to the contrary!

1 comments

Good point! I always blindly assumed that removing whitespaces would lead to a decent size improvement, even after gzipping, so I ran a small test (gzip on linux, default parameters):

http://i.imgur.com/U1O4Xg5.png

The raw json contains the whitespaces, while they were removed in the minified json. So there is a 47% improvement for the uncompressed version, and a 21% improvement for the compressed version.

What would be interesting to see is how the second (compressed) number scales with the filesize (I don't know enough about compression algorithms to guess that).

EDIT: I really don't know how to format a table in plaintext...