Enabling HTTP Compression for faster FogBugz page load

 

HTTP compression can drastically improve FogBugz performance by reducing the amount of bandwidth consumed for each page load.  Enabling HTTP compression is easy for both IIS and Apache, and you'll find that your FogBugz pages are reduced to approximately 10% of their original size.  You will pay a slight penalty in increased server CPU load, but we think that the tradeoff makes HTTP compression a no-brainer.

IIS 5

Download the free tool available at http://sourceforge.net/projects/flatcompression (follow the links to download FlatCompression...you want to download FlatComp-R-1.20.226.dll.zip).  FlatCompression's extended documentation is available, but you should only need to follow the simple steps below.

  1. Unzip FlatComp-R-1.20.226.dll and place it in C:\Windows\system32\inetsrv
  2. Go to Control Panel | Administrative Tools | Internet Information Services
  3. Expand "Local Computer", right-click on "Web Sites", and click Properties
  4. Click the "ISAPI Filters" tab, click Add, and enter "FlatCompression" as the filter name.
  5. Browse to C:\Windows\system32\inetsrv\FlatComp-R-1.20.226.dll for the executable.
  6. Click Ok, restart IIS.

IIS 6

IIS 6 ships w/ support for HTTP compression, but you need to take a couple configuration steps.  Scott Forsyth's walkthrough is the best detailed explanation we've found.  Follow his three simple sections (Enable Compression in IIS, Create a Web Service Extension, and Now for the metabase changes), and you should be all set.

Apache

If your PHP is built with zlib, then adding compression should be as simple as adding the following line to your php.ini, and restarting apache:

zlib.output_compression = On

There are a couple of caveats; for instance, this won't work with ob_gzhandler. For a fuller explanation, check out http://php.net/zlib. If you're not sure whether or not your PHP is built with zlib, you can create a test script as shown here: http://www.fogcreek.com/FogBugz/KB/trouble/fogutil.soProblems.html, and look in the "Configure Command" section.

That's it!  Your compression should be up and running, and if you keep an eye on your network traffic you'll notice that individual requests consume significantly less bandwidth.