Current version produces a all.js of about 375 kB data by default. Most of it isn't needed. Could it be solved by registering the needed functions and compile it with Closure Compiler?
What do you mean by saying it isn't needed? Most of it is part of Opa's runtime, which will be used in all but trivial Opa applications.
I mean that only a few functions are used by the applications, not all of the 375 kB. Of course, the runtime is needed, but can be dumbed down to a few 10s kB or so when knowing the required functions.
For example, the app only uses $ select function, .show() and hide() from jQuery, only those are compiled.
For example, this (small) app using GWT uses only a 4.87 KB js file:
(But I think opa's concept is much, much better)
About the closure compiler part, all.js is already closure compiled ;)
Yes, OK, but all functions are enabled :)
Contributions are welcome - or we will begin working on this in about two months hopefully.
Are there any updates on this issue? Still seeing JS files with no fancy functionality weighing ~350kb.
We have greatly optimized the JS size. That said, Opa relies on some JS libraries (jQuery, etc.) that takes about 200kb. The cost is high for a "toy" but negligible for a real app. Note that you also can use lower level primitives to generate pages without the Opa stdlib by yourself and reduce the size of the JS.