Last month I set out to see how far I could <a href="http://www.reybango.com/index.cfm/2007/7/22/Compressing-Sprys-JavaScript-Files">compress the CF8 JavaScript files</a>. As many have come to find out, the YUI, Ext and Spry JS files can be rather large and I wanted to bring them down as much as possible. 

As I was reading <a href="http://ajaxian.com/archives/yui-compressor-the-latest-minification-tool">Ajaxian</a> today, I saw a post about a new compressor called <a href="http://www.julienlecomte.net/blog/2007/08/13/introducing-the-yui-compressor/">YUI Compressor</a> which is a Java-based application which helps to greatly minify your JavaScript code. In speaking to my friend Tane Piper, he told me that he saw *amazing* results when he used it against his jQuery plugins. So I had to give this a shot against the CF8 files.

I immediately tried it against Spry&apos;s largest file, SpyData.js, and here were my results:

SpryData.js uncompressed: 126k
SpryData.js minified: 66k

Woah! Almost a 50% reduction in size.

I then tried it against the <a href="http://alex.dojotoolkit.org/shrinksafe/">Dojo ShrinkSafe</a> version of SpyData.js that I had created last month:

SpryData.js compressed with ShrinkSafe: 72k
SpryData.js minified: 64k

Wow, even more reduction if I run through the file through ShrinkSafe first!

I did try this on the Ext-All.js file and also saw a reduction of 30k in an already compressed file!

This is really a good utility to have and the results are outstanding. I would say to use this in conjunction with another packer and some http compression for really boosting performance on your web apps.

*** NOTE: If you&apos;re going to use this, please be sure to backup your existing CF8 JavaScript files just in case something doesn&apos;t work as expected.

 <a href="http://www.julienlecomte.net/blog/2007/08/13/introducing-the-yui-compressor/">YUI Compressor</a>