4 ms·
I've been using Closure Compiler with ADVANCED_OPTIMIZATIONS (which does the dead-code removal) for soundslice.com for several years. It is truly awesome! Chec
by adrianh 11y ago
I've been using Closure Compiler with ADVANCED_OPTIMIZATIONS (which does the dead-code removal) for soundslice.com for several years. It is truly awesome!
Check out 39:30 in my 37signals talk at http://37signals.com/talks/soundslice http://37signals.com/talks/soundslice to find out more about it.
The downside is that, in order for the dead-code elimination to work properly, you need to make sure to "export" things that aren't explicitly called in your JS module. For example, if your JavaScript module just provides some functions that are called by a web page, you'll need to make sure those function calls are "seen" by the compiler so that it doesn't delete them. It just takes a bit of time and thinking to set this up; I believe it originally took me a day to do so for Soundslice.