Been bumping into a problems with tools that do CSS minification.
The first is that most css minifiers use regexs to find and fix
bloated CSS. This was the approach taken by cssmin and YUI Compressor
and nearly all other tools out there seem to just be ports or slight
modifications to YUI's logic. Unfortunately these regexs are pretty
slow, especially the empty rule regex. The problem gets worse the
larger the CSS file is and performance techniques like combining CSS
files and embedding background images as data URIs makes for some huge
CSS.
The first problem led me to the second: I went looking for a css
minifier that didn't use regexs and I learned that not all CSS
minifiers do the same thing. The new C++ implementation the CSS
minifier in Google's Page Speed, for example, is just a port of
JSMin's logic. It removes comments, and whitespace. Now don't get me
wrong, it is super fast. Only one pass through the character array
until YUI's 12 or so. But its not a very comprehensive minifier.
That's it. Even the various ports of YUI Compressor's logic are
different. They don't have all of the regexs, etc. So its almost
impossible to know what someone means when they say "css minification"
because there is no standard.
Anyone know of a CSS minifier that is fast *and* comprehensive?
Thanks,
Billy
--
Check your Website's Performance Now:
http://zoompf.com/free
--
You received this message because you are subscribed to the Google Groups "Make the Web Faster" group.
To post to this group, send email to
make-the-...@googlegroups.com.
To unsubscribe from this group, send email to
make-the-web-fa...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/make-the-web-faster?hl=en.