Ticket #8794 (closed enhancement: invalid)
Use Closure Compiler for minification
| Reported by: | paul.irish | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.next |
| Component: | build | Version: | 1.5.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Just watched a presentation from Closure Compiler's lead developer. He was asked about jQuery and the fact that it had switched to Uglify.
He was aware of the switch and found an issue with CC that led to larger filesize. jQuery's use of returning the closure that defined jquery and using that for the global definition... (i think) was what led to some longer local names than necessary.
Alan said the current release of CC should compile 2-3% smaller than uglify.
As an unrelated side note: CC targets gzip size, so when you see leftover optimizations not touched, it is likely they do not effect the gzipped size in the right direction. (Like using !0 in place of true)
Change History
comment:1 Changed 2 years ago by rwaldron
- Status changed from new to open
- Component changed from unfiled to build
comment:2 Changed 2 years ago by john
- Status changed from open to closed
- Resolution set to invalid
I just tested with the latest build and it looks like it's only saving us about 47 bytes (minified + gzipped) - which doesn't seem to be significant enough to warrant a switch. If greater benefits come in then we'll certainly land it.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
