Re:Some analysis of the 1M most popular sites on the web
by euroclydon on Friday July 24, 2015 @03:10PM
(#9944426)
While your integrating Closure Compiler's Advanced Mode, you might as well re-write your entire client side code... Because you'll likely have to.
Re:Some analysis of the 1M most popular sites on the web
by jwr on Saturday July 25, 2015 @03:56AM
(#9946941)
Well, it's something we should look at, especially the library makers.
People who write ClojureScript regularly encounter this: we get this optimized and trimmed down app, and then something needs jQuery, so we have to pull all of it in. After you've used advanced compilation for a while, it feels downright dirty and wasteful to pull in entire blobs of code, not just the function trees you actually need.
Re:Some analysis of the 1M most popular sites on the web
by nostrademons on Friday July 24, 2015 @02:01PM
(#9943916)
You can also define a separate externs file with a list of symbols that shouldn't get mangled; this is useful if eg. you're using a third-party library that you don't want to modify.
Public methods get unmangled symbols. Everything else gets renamed to a short name to save bandwidth.
Dependencies are specified with goog.require.
Anything that doesn't get required with goog.require or isn't called by a public function gets culled.