Skip to main content

Bug Tracker

Side navigation

#8794 closed enhancement (invalid)

Opened April 06, 2011 10:37PM UTC

Closed April 16, 2011 04:45PM UTC

Last modified April 18, 2011 05:48PM UTC

Use Closure Compiler for minification

Reported by: Owned by:
Priority: undecided Milestone:
Component: build Version: 1.5.2
Keywords: Cc:
Blocked by: Blocking:

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)

Attachments (0)
Change History (3)

Changed April 07, 2011 12:35AM UTC by rwaldron comment:1

component: unfiledbuild
status: newopen

Changed April 16, 2011 04:45PM UTC by john comment:2

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.

Changed April 18, 2011 05:48PM UTC by Alan comment:3

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