cd ace/component/resources/icefaces.ace
ls -l `find . -name *.js | grep -v .svn`
4446 ./accordion/accordion.js
1451 ./animation/animation.js
6487 ./checkboxbutton/checkboxbutton.js
2101 ./confirmationdialog/confirmationdialog.js
1184 ./contextmenu/contextmenu.js
14539 ./core/core.js
1918 ./dataexporter/dataexporter.js
44478 ./datatable/datatable.js
45075 ./datetimeentry/datetimeentry.js
3861 ./dialog/dialog.js
2360 ./dnd/dragdrop.js
11940 ./fileentry/fileEntry.js
236201 ./jquery/jquery.js
355121 ./jquery/ui/jquery-ui.js
5834 ./linkbutton/linkbutton.js
7316 ./maskedentry/maskedentry.js
5163 ./menu/menu.js
2059 ./notificationpanel/notificationpanel.js
72469 ./paginator/paginator.js
4242 ./panel/panel.js
2006 ./printer/printer.js
4126 ./progressbar/progressbar.js
5379 ./pushbutton/pushbutton.js
2545 ./resizable/resizable.js
4066 ./sliderentry/slider.js
12112 ./tableconfigpanel/tableconfigpanel.js
26424 ./tabset/tabset.js
381988 ./together-min.js
762844 ./together.js
85473 ./tooltip/jquery.qtip-1.0.0-rc3.js
38404 ./tooltip/jquery.qtip-1.0.0-rc3.min.js
5195 ./tooltip/jquery.qtip.debug-1.0.0-rc3.js
1787 ./tooltip/tooltip.js
24954 ./util/combined.js
68906 ./util/combined.js.tmp.js
7690 ./util/component.js
3526 ./util/util.js
156983 ./wijmo/wijmo.js
71098 ./yui/paginator/paginator-debug.js
23029 ./yui/paginator/paginator-min.js
71098 ./yui/paginator/paginator.js
124338 ./yui/utilities/utilities.js
cat ./jquery/jquery.js ./jquery/ui/jquery-ui.js ./wijmo/wijmo.js ./core/core.js > together.js
java -jar ../../../../lib/yui-compressor.jar --preserve-semi -o together-min.js together.js
ls -l together*.js
381988 together-min.js
762844 together.js
Add in 25 KB for combined.js (which is already minified), and our total compressed size for all our common javascript is about 400 KB. That's still not counting javascript specific to the actual components.
cat ./accordion/accordion.js ./animation/animation.js ./confirmationdialog/confirmationdialog.js ./contextmenu/contextmenu.js ./dataexporter/dataexporter.js ./datatable/datatable.js ./datetimeentry/datetimeentry.js ./dialog/dialog.js ./dnd/dragdrop.js ./fileentry/fileEntry.js ./maskedentry/maskedentry.js ./menu/menu.js ./notificationpanel/notificationpanel.js ./paginator/paginator.js ./panel/panel.js ./printer/printer.js ./progressbar/progressbar.js ./resizable/resizable.js ./sliderentry/slider.js ./tableconfigpanel/tableconfigpanel.js ./tooltip/jquery.qtip-1.0.0-rc3.min.js ./tooltip/tooltip.js > all-comps.js
java -jar ../../../../lib/yui-compressor.jar --preserve-semi -o all-comps-min.js all-comps.js
ls -l all-comps*
146619 all-comps-min.js
278751 all-comps.js
So about another 145 KB for all the components. That's excluding YUI, which 1-2 components rely on. More than half a MB, compressed, before YUI, indicated that regular minification might not cut it. We should probably look into the minification tools that examine the javascript and cut out the code that's not actually being used.
As it stands, using our mostly non-minified code, we're serving out 762844 + 24954 + 278751, which is about 1 MB. Plus YUI. And that might really be two versions of YUI, one for legacy ACE and one for pagination.
It looks like only the menu related components, and panel make use of wijmo, which takes up 156983 bytes unminified. If we were to partition the components, that would be a good place, as long as core.js doesn't rely on wijmo.js. I did find a small dependency on YAHOO, which we'll have to move elsewhere.
The other obvious partition is the legacy ACE components that still rely on YUI.
The minified javascript seems to still contain copyright notices, to we'll have to figure out how to remove those.
Combine all the YUI 2.8 javascript into a single javascript file. Well, two, one of all the minified files, and one of all the debug files. Use the @ResourceDependency annotations in TabSetMeta to drive this.
Create logical groupings of javascript files for the new ACE components. Possibly jquery and jquery-i and core should be combined. And, for example, if there are a lot of very small files, those should all be grouped into one single file. We should come up with some sort of cutoff, where if we have some very large files, those are kept separate, so apps don't incur their overhead if those components are not in use. It would be nice if components were logically grouped, so for example, all of the various menu related components were all put together.
We should then create minified copies of these combined files, so that ICE-6195 may then allow for switching between them based on project stage.
Look into combining the css files too. We've had problems in the past using minification on css though.
Update all the component @Resource dependencies to use the combined files instead of the individual files.