So, I’ve been fiddling with compressing my pages to reduce bandwidth. I had been using ob_gzhander, which compresses pages at the script level, but the other day I figured out how to get zlib.output_compression working, which compresses pages at the web server level. [ini_set wasn’t working, but I figured out I could enable it via .htaccess.]
I tried the different compression levels and recorded the compressed page size and the page generation time for each level. I used my November 2005 archive page for the test. Here’s the results:
|compression level||page size
|av. gen time
So it turns out the default level of compression, which appears to be compression level 6, is a good choice to use. Interestingly, my page generation time increases when I don’t compress the page. Since the compression is done by the web server and not PHP, compression should have no effect on the generation time. This suggests there’s probably something wrong with my page generation timer code and that it’s waiting for some action from the client.
I’m sure no one but me cares. 🙂