Excellent guide!
I will be adding (soon) an enhancement to the single file build that
will also compress the CSS files (YUI compressor does CSS too!) and a
method of combining all the icon images into a single image strip and
producing a CSS file that allows referencing those images in buttons
from the strip, reducing the number of image assets that have to be
loaded to a minimum as well.
I'll include documentation in your wiki page when its done ;)
Cheers
Paul
On 21-Aug-08, at 2:53 PM, Jason Birch wrote:
If you are using the SVN version, you may also want to use the Ant
build system to compile your Fusion install into a single compressed
binary. For production sites, it’s recommended to write your
ApplicationDefinition out to a file and include this in the build as
well.
This is easier than it sounds (if you’re running from SVN) and makes
a real difference in load time.
If you don’t already have one, download a current JDK (SE) package
from Sun.
http://java.sun.com/javase/downloads/index.jsp
Most versions appear to work; I’m currently using JDK5. Ensure that
this is the first Java on the path and, maybe, set JAVA_HOME. You
can do this temporarily as part of your build routine too (I am, so
I don’t mess up my Oracle drivers).
Next download the Ant binaries:
http://ant.apache.org/bindownload.cgi
and place in a top-level folder like C:\Ant\
Finally, obtain the YUI compressor
http://developer.yahoo.com/yui/compressor/
From the author’s website
http://www.julienlecomte.net/yuicompressor/
and unzip it in a top-level folder like C:\YUI\
Now, go to your SVN repository and modify the YUIcompressor property
to point to the location of your jar:
http://trac.osgeo.org/fusion/browser/trunk/build.xml#l92
With this in place, you’re ready to build. In my case I mapped a
drive to my Fusion checkout, and opened a command window on my PC
pointing to that directory. Following the instructions on the
Fusion wiki
http://trac.osgeo.org/fusion/wiki/ANTBuildSystem
I typed:
ant singlefile
This seemed to go well, so I deleted the build directory and typed
Ant singlefile –DappDef=x:/myapp/applicationdefinition.xml
This also worked well.
Because I am running my test site directly against SVN, I copied the
FusionSF-compressed.js (or something like that) file from the build
directory back into the main fusion/lib directory, and pointed my
template to it. Load time decreased significantly.
I’ve been meaning to add this to the Fusion wiki; just haven’t had
time to write it up and test it yet. Now I’m half done J
Jason
From: Andrew DeMerchant
Subject: Re: [mapguide-users] Fusion + Oracle datasource problem
What sort of webserver are you running? I'm using IIS5, and just
enabled compression using FlatCompression (www.flatcompression.org)
and it has dramatically sped up my initial load times for Fusion....
_______________________________________________
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users
_______________________________________________
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users