1. #1
    Sencha Premium Member ethraza's Avatar
    Join Date
    Jun 2007
    Location
    Brazil
    Posts
    362
    Vote Rating
    3
    ethraza is on a distinguished road

      0  

    Thumbs up Plus 56.4% of compression to ext-all.js

    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.

    Size reduction:
    Percentage: 56.4%
    Bytes: 277548 bytes
    I don
    LAMPE (Linux / Apache / MySQL / PHP / ExtJs)

  2. #2
    Ext User shadyaidy's Avatar
    Join Date
    Mar 2007
    Location
    Ilkeston, UK
    Posts
    4
    Vote Rating
    0
    shadyaidy is on a distinguished road

      0  

    Default You may get better results with GZipping

    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.

  3. #3
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    16
    jack.slocum will become famous soon enough

      0  

    Default


    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
    Ext JS Founder
    Original author of Ext JS 1, 2 & 3.
    Twitter: @jackslocum
    jack@extjs.com

  4. #4
    Sencha Premium Member ethraza's Avatar
    Join Date
    Jun 2007
    Location
    Brazil
    Posts
    362
    Vote Rating
    3
    ethraza is on a distinguished road

      0  

    Question


    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)

  5. #5
    Sencha User trbs's Avatar
    Join Date
    Mar 2007
    Posts
    310
    Vote Rating
    0
    trbs is on a distinguished road

      0  

    Default


    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.
    I'm part of the Ext Community
    Maintaining: Translations and some Examples
    Developing on: ExtJS Python Builder / Gozerbot
    Places: Ido.nl.eu.org / My ExtSamples / Trbs on Wiki / IRC

  6. #6
    Ext User matjaz's Avatar
    Join Date
    Apr 2007
    Location
    Slovenia
    Posts
    126
    Vote Rating
    0
    matjaz is on a distinguished road

      0  

    Default


    The best one is YUI Compressor + gzip on server and you win.

    Also take a look at this post of YUI compressor author.
    Very interesting comparison of YUI compressor and packer.
    Regards,
    M.

  7. #7
    Ext User CuamckuyKot's Avatar
    Join Date
    Jun 2007
    Location
    Russia, Saint Petersburg
    Posts
    17
    Vote Rating
    0
    CuamckuyKot is on a distinguished road

      0  

    Default


    I've tried Bananascript, but it compressed ExtJS with a lot of mistakes - so it doesn't work at my project.

  8. #8
    Sencha Premium Member ethraza's Avatar
    Join Date
    Jun 2007
    Location
    Brazil
    Posts
    362
    Vote Rating
    3
    ethraza is on a distinguished road

      0  

    Thumbs up


    Lon time have passing by, so now I know and can confirm... YUI compressor + compression on server rocks!
    LAMPE (Linux / Apache / MySQL / PHP / ExtJs)