davidB / yuicompressor-maven-plugin

maven's plugin to compress (Minify / Ofuscate / Aggregate) Javascript files and CSS files using YUI Compressor
http://davidb.github.io/yuicompressor-maven-plugin/
GNU Lesser General Public License v2.1
122 stars 48 forks source link

Minifying in parallel #55

Open andrey81inmd opened 11 years ago

andrey81inmd commented 11 years ago

It would be nice to have a feature to minify multiple files in parallel. If I have 200 js files to minify in a build, it takes a good several minutes. It should be possible to fork X number of processes to minify different files at the same time, so that the whole build would be done quicker.

Thanks, Andrey

jpaulo commented 11 years ago

Hey! I would like that too!

oliver-brm commented 10 years ago

We have some experience with forking a number of processes for minifying JavaScript files. In our case, we did that with Apache ant and Google's Closure compiler. That process was terribly slower compared to minifying the files in serial with Maven and YUI compressor plugin.

The reason is that the overhead of forking a process to minify a single file overweighs the advantage of doing things in parallel. If all processes were forked at the beginning, minified multiple files each and lived until all the work is done, that would be much faster I think.