[mapguide-internals] Adding JxLib to the basic viewer

Paul Spencer pspencer at dmsolutions.ca
Tue Aug 18 17:36:26 EDT 2009


Note that you can decrease the size of jxlib to something more  
reasonable if you use the download builder.  For instance, assuming  
that you just wanted to include a Jx.Tree and no other components and  
no optional things, it would be 72kb compressed (using the Dean  
Edwards Packer, which is better than both jsmin and the yuicompressor  
at this point) - that's not gzip compressed, just white space,  
comments and obfuscation by shorting variable names.  gzip compression  
brings it down to about 20kb.

The optional dependencies add the Drag class from MooTools to, err,  
prevent dragging (seriously!) and bring it up to 84kb compressed.

Jx.Button is also a pretty nice (and light weight) addition to a UI,  
it would add another 4kb bringing the total to 88kb compressed.

If you want to try this, change the compression options and pick the  
Packer option and Zip output (tar and tar.gz are broken, your download  
won't start).  Make sure you check the check boxes to include Mootools  
Core and More and select the dependencies only option.

Cheers

Paul

PS the jxlib stylesheet adds another 40kb of CSS (compressed, before  
gzip) and there are also images that get loaded, minimal in the case  
of just using buttons or trees.  Oh and there are two browser-specific  
style sheets for ie6 and ie7 which should be included using  
conditional IFIE comments, they are pretty small.  Sadly the download  
builder does not yet build minimized versions of the CSS files that  
exclude the unnecessary styles.  I'm going to file an enhancement for  
adding that, what a great idea!

On 18-Aug-09, at 4:56 PM, Tom Fukushima wrote:

> Hi,
>
> If we were to add the JxLib to the basic viewer for its ability to  
> do a nice hierarchical list view in some advanced UI for selection  
> (so that you can choose which feature to select when several  
> overlap) does anyone see any problems with this?
>
> In particular, I am concerned about the size increase to the basic  
> viewer.  The JxLib is about 250 KB compressed so it would basically  
> double the download size of the basic viewer which currently sits at  
> about 200KB.
>
> For your convenience, here is the "perfect" download time for 250KB:
> 56.6 Kbps: 36s
> 256 Kbps: 8s
> 1,024 Kbps: 2s
>
> Is the download size really a concern? If it is, are there ways to  
> reduce the impact such as loading the JxLib lazily only when used  
> (is this possible?) or extracting ony the hierarchical list part out?
>
> I don't really follow the mapguide-users list so if someone wants to  
> post and monitor this on that list, please do.
>
> Thanks
> Tom
> _______________________________________________
> mapguide-internals mailing list
> mapguide-internals at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals


__________________________________________

    Paul Spencer
    Chief Technology Officer
    DM Solutions Group Inc
    http://research.dmsolutions.ca/



More information about the mapguide-internals mailing list