Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#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:
Blocked by: Blocking:

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 (3)

comment:1 Changed 12 years ago by Rick Waldron

Component: unfiledbuild
Status: newopen

comment:2 Changed 12 years ago by john

Resolution: invalid
Status: openclosed

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.

comment:3 Changed 12 years ago by Alan

Closure Compiler inserts linebreaks randomly. Removing the linebreaks saves around 200 bytes.

Note: See TracTickets for help on using tickets.