4 ms·
So you rewrote unoptimized Java from scratch to get a 50% speed improvement? You probably could have gotten that by modifying a few dozen lines of the original,
by rossjudson 14y ago
So you rewrote unoptimized Java from scratch to get a 50% speed improvement? You probably could have gotten that by modifying a few dozen lines of the original, which appears to be written for clarity, not speed.
- Mithaldu 14y agoNote how startup time is a big factor. Also, strong claim, can you support it and write a faster version of YUICompressor? (Also please make sure it handles all these test cases correctly: https://metacpan.org/source/JANUS/CSS-Compressor-0.02/t/yui https://metacpan.org/source/JANUS/CSS-Compressor-0.02/t/yui )
- RyanZAG 14y agoAny reason it can't be kept resident so you don't have to start it up all the time? Should be a fairly simple change to add a batch mode or similar... Alternatively, best practices appear to be to use caching of the css files: http://developer.yahoo.com/yui/compressor/#using http://developer.yahoo.com/yui/compressor/#using "If you wish to minify your files on the backend (also known as on-the-fly minification) instead of at build time, you will want to cache the minified files in memory for optimal performance (instead of minifying the same files over and over & minification is a time consuming process) Note that the YUI Compressor can easily be instantiated and used from a Java-based environment (Servlet). "
- rossjudson 14y agoThe line is just "50% faster"?
- draegtun 14y agoThe speed improvement is a bonus because the real benefit is it being an easy to install & use app/module (the only dependency is Perl). If I was after bigger speed bump then I would consider using CSS::Minifier::XS which is a Perl + C app/module - https://metacpan.org/module/CSS::Minifier::XS https://metacpan.org/module/CSS::Minifier::XS NB. CSS::Minifier::XS is reputedly 152% faster than CSS::Compressor - http://www.reddit.com/r/perl/comments/14udtf/efficient_css_compression_in_perl/c7gjbe3 http://www.reddit.com/r/perl/comments/14udtf/efficient_css_c...