21 Aug 2007 8:19 PM #1
Plus 56.4% of compression to ext-all.js
Today I discovered the Bananascript 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.
Bytes: 277548 bytesLAMPE (Linux / Apache / MySQL / PHP / ExtJs)
22 Aug 2007 2:00 AM #2
You may get better results with GZipping
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 #3
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.Jack Slocum
Sencha Co-Founder, Ext JS Founder
Original author of Ext JS 1, 2 & 3.
27 Aug 2007 4:26 PM #4
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.LAMPE (Linux / Apache / MySQL / PHP / ExtJs)
29 Aug 2007 5:57 PM #5
from the faq on the site:
What is Bananascript.com?
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 #6
4 Feb 2008 7:22 AM #7
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 #8
Lon time have passing by, so now I know and can confirm... YUI compressor + compression on server rocks!LAMPE (Linux / Apache / MySQL / PHP / ExtJs)