--- Comment #8 from Trevor Parscal <> 2011-01-19 00:32:23 
UTC ---
As Chad mentioned, JSMin is now in includes/libs/JSMin.php - ResourceLoader
uses it.

We can either request special permission from the author, or use something else

I did some benchmarking with JSMin, Tim's modified JSMin, and some GPL friendly
alternatives. Tests were run on the development version of jQuery 1.4.4.

Library            Time (sec)  Minified (bytes)  Compressed (bytes)
JSMin (Original)   3.50        100221            27983
JSMin (MediaWiki)  1.71        105990            29087
JavaScriptPacker   1.36        54886             26327
JSMinPlus          5.47        98382             27636

As you can see, Tim's changes to JSMin got the cost of running it down a bit.
JavaScriptPacker is still the fastest, but it does some really scary things to
try and get the minified size down, which are pretty much done in vein since
the gzipped version is so similar in size as all the other minifiers which
output much more sane and reliable code. JSMinPlus is really expensive to run,
but I'm sure we could optimize it - at least it's a GPL compatible starting

The alternative is of course, we write something of our own. I ended up doing
just that for CSS minification since we wanted to do some really particular
things that other libraries did not do or did not do well enough for our needs,
such as data URI embedding and URL remapping. But the most compelling reason
was that all the CSS minifiers out there were way too complex, and caused a lot
of problems when CSS hacks were introduced. Furthermore, the difference between
running the text through about 5 regular expression replacements and parsing
the CSS into a structure and spitting it back out was negligable. This may or
may not prove to be the case with JavaScript, but it's something to consider.

If we could have something incredibly simple and 80% effective and support
hooking into things like Google ClosureCompiler or the JSMin PHP extension on
our own cluster, we will be in the clear license-wise and still be able to get
the final 20% in our own production environments.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

Wikibugs-l mailing list

Reply via email to