[MapQuery] JS compressor

Steven M. Ottens steven at minst.net
Thu Jul 14 12:07:31 EDT 2011


Op 7/14/2011 5:22 PM, Volker Mische schreef:
> Hi Steven,
>
> The sizes that matter are the gzipped ones. Packer (I don't know if it 
> does, but the name sugggests) might do some kind of packing, but this 
> is what the on-the-fly gzip compression is for.
>
True, but Packer isn't a zipping algorithm, just a minifier/obfuscator, 
it can still be gzipped; it'll be 7.9KB. But indeed, google closure's 
code is gzipped 6.77KB (according to google). So it might be that Uglify 
gzipped is as small or smaller as Packer gzipped. I'll set up an 
uglifier the week after the next.

Steven


> Cheers,
>   Volker
>
> On 07/14/2011 07:09 AM, Steven M. Ottens wrote:
>> Thanks Drew,
>>
>> Jenkins runs on linux and has node installed, so it sounds like a
>> perfect solution. I'll try to set it up after my holidays :)
>> I noticed however that uglify (and all others) produces a bigger file
>> than Packer (all not gzipped):
>>
>> Packer 3.1: 16776 bytes (23.4%)
>> Closure: 26348 bytes (35.7%)
>> Uglify: 26494 bytes (35.9%)
>> YUI 2.4.2: 27163 bytes (37.9%)
>> Dojo: 30269 bytes (42.2%)
>> JSmin 31645 bytes (44.1%)
>> Unpacked: 73673 bytes (100%)
>>
>> I find it interesting that Packer is so much smaller than the rest. If
>> someone does have the time to create a node.js version of Packer 3.1
>> that would be nice to have.
>>
>> Steven
>>
>> Op 7/14/2011 2:49 PM, Drew Wells schreef:
>>>
>>> Try uglifyjs it runs on node. Its what jquery uses now. You will need
>>> to use cygwin to run it on windows until the port is complete.
>>>
>>> On Jul 14, 2011 7:54 AM, "Steven M. Ottens" <steven at minst.net
>>> <mailto:steven at minst.net>> wrote:
>>> > Hi all,
>>> >
>>> > Our infamous goto() function crashes Google's closure, Dojo's
>>> ShrinkSafe
>>> > and YUI's compressor. However it works with Packer. I tested the
>>> > different compressors using: http://compressorrater.thruhere.net/ 
>>> (and
>>> > replacing goto with gotos to prevent crashing). It turned out that
>>> > Packer is the smallest and fastest, so we can keep the goto() 
>>> function.
>>> >
>>> > However Packer.js is a javascript library and I'm not skilled
>>> enought to
>>> > turn it into something I can use in jenkins/linux shell. If someone
>>> > could have a look and create something nifty, I'll be much obliged.
>>> >
>>> > Packer.js: http://dean.edwards.name/packer/Packer.js
>>> > Packer site: http://dean.edwards.name/packer/
>>> >
>>> > Regards
>>> > STeven
>>> >
>>> > _______________________________________________
>>> > MapQuery mailing list
>>> > MapQuery at lists.osgeo.org <mailto:MapQuery at lists.osgeo.org>
>>> > http://lists.osgeo.org/mailman/listinfo/mapquery
>>
>>
>>
>> _______________________________________________
>> MapQuery mailing list
>> MapQuery at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapquery
>




More information about the MapQuery mailing list