There are a few tickets on the RoR trac asking for some sort of compression of the source (#5830, #4729, #4191). I’ve traditionally been against this, mainly because I’ve used third-party libraries that were minified, and found them impossible to work with when something goes wrong. With the most recent ticket, I found myself writing another comment and closing it, but I decided to look into it more before I did. I used the Dojo compressor (labeled rhino) and Dean Edward’s packer (labeled packed) to compress prototype.js.

55149 prototype.js (100%) 12479 prototype.js.gz (22.6%) 22541 prototype.packed.js (40.9%) 10450 prototype.packed.js.gz (18.9%) 38696 prototype.rhino.js (70.2%) 11208 prototype.rhino.js.gz (20.3%)

The Dojo compressor works with Prototype without any modification to the source. Dean Edward’s packer required adding semi-colons in a number of places, and took several run-throughs of the packer to debug the result. So you can beat regular ol’ gzipping by 2.3% of the original size (10.2% further reduction) easily with the Dojo compressor, or by 3.7% (16.3% further reduction) with some work on your part with Dean Edward’s packer. These rather modest gains strike me as simply not worth the effort. Anyone have different results?