Unless I'm doing something wrong, they need to do some optimizations to code size if this is going to be used client side nearly 30k is a lot of overhead for a function that returns "Hello, world!"
I didn't read either the article or what you did carefully, but I do wonder if either (a) you're supposed to run the output of their compiler through Google Closure's compiler which removes most of the code (which is probably library functions unused by your little function), or (b) the 30K is a pretty much one time cost, and if your code grows the output increases moderately.
Given that Google Closure optimizes out unused code, I'm going to guess that the more that the Google Closure library is used, the more of it will be added to the minified source.
As a point of reference, their sample twitterbuzz app which uses the Google Closure library is 100k minified.
That being said, this is alpha software so it's hard to criticizes it's lack of output optimization at this point.
Comments
Unless I'm doing something wrong, they need to do some optimizations to code size if this is going to be used client side nearly 30k is a lot of overhead for a function that returns "Hello, world!"
http://pastebin.com/P5MTvP5Q
I didn't read either the article or what you did carefully, but I do wonder if either (a) you're supposed to run the output of their compiler through Google Closure's compiler which removes most of the code (which is probably library functions unused by your little function), or (b) the 30K is a pretty much one time cost, and if your code grows the output increases moderately.
I believe it's already going through Google Closure. That's what {:optimizations :advanced} does.
I'm certain it's a one time cost. Though I suspect that given that Closure [optimizes out unused code](http://blog.fogus.me/2011/07/21/compiling-clojure-to-javascr...) the more I use of the goog namespace, the larger that baseline will become.
That being said, 30k is the size of minified jQuery, so folks that are alright with building apps on jQuery won't find 30k to be that terrible.
It's a one-time cost, but we're also not done improving Closure Compiler's ability to minify core.
There's a lot of Closure Compiler-specific metadata we're not leveraging yet, and our goal is to reduce the baseline to much, much less.
You should try it on a larger code base before jumping to any conclusions, you'll see that 30k grows quite slowly.
EDIT: sorry, I meant larger pure ClojureScript code base.
Given that Google Closure optimizes out unused code, I'm going to guess that the more that the Google Closure library is used, the more of it will be added to the minified source.
As a point of reference, their sample twitterbuzz app which uses the Google Closure library is 100k minified.
That being said, this is alpha software so it's hard to criticizes it's lack of output optimization at this point.
I guess I don't see how this is any different from the kind of expected bloat that say jQuery UI adds to a project.