View Full Version : Plus 56.4% of compression to ext-all.js

21 Aug 2007, 8:19 PM
Today I discovered the Bananascript (http://www.bananascript.com/index.php?compress) in a post on the Brazilian EXTjs forum.

It is a js minifier engine. And a very impressive one!

I uploaded the 1.1 ext-all.js (minified) and get impressed with how much it compressed the js file...

ext-all.js (minified original) = 480 KB (491.818 bytes)

ext-all.js (Bananascript) = 209 KB (214.270 bytes)

Compression completed in 196 seconds.

Size reduction:
Percentage: 56.4%
Bytes: 277548 bytes

I don

22 Aug 2007, 2:00 AM
It is VERY impressive - i haven't ever seen a minifier do such an impressive job on JS files.

However, in an admittedly crude test, I zipped ext-all.js and it compressed from 480K to 130K. However, zipping the 209K ext-all.js outputted from bananascript only resulted in a 150K filesize, 20K larger.

I suspect the results would be much the same with GZipping.

26 Aug 2007, 7:26 AM
Gzipping is the best as it only gets unzipped once by the browser and is cached in it's uncompressed form.

Using packer or bananascript results in every page "unpacking" the file. That time to unpack is in the range on my computer of 350-500ms which IMO is unacceptable. ext-all.js is just too large for these types of packers. In the end, gzip offers better compression anyway.

27 Aug 2007, 4:26 PM
Maybe I'm wrong but I have understand that the bananascript only strips out the comments, unnecessary spaces and change the variables names to short ones like _1, _2, ... and differs from the Ext minify aprouch only in the variables names change by short ones.
If so, the brownser don't need to unpack nothing, only interpret the script as any other.

29 Aug 2007, 5:57 PM
from the faq on the site:

What is Bananascript.com?
Bananascript.com is a free online tool to compress javascript files into very small and self extracting files.

How is the compression done?
Besides the common removal of comments, tabs and spaces as seen in many other tools, this tool also performs "real" compression on the files. The idea is simple, replace long recurring byte sequences by shorter ones.

29 Aug 2007, 11:05 PM
The best one is YUI Compressor (http://www.julienlecomte.net/yuicompressor/) + gzip on server and you win.

Also take a look at this post (http://www.julienlecomte.net/blog/2007/08/21/gzip-your-minified-javascript-files/) of YUI compressor author.
Very interesting comparison of YUI compressor and packer.

4 Feb 2008, 7:22 AM
I've tried Bananascript, but it compressed ExtJS with a lot of mistakes - so it doesn't work at my project.

4 Feb 2008, 10:30 PM
Lon time have passing by, so now I know and can confirm... YUI compressor + compression on server rocks! ;)