Minify: Add benchmarks that show transpilation + minification times

Created on 26 Aug 2016  路  2Comments  路  Source: babel/minify

What people actually care about w.r.t. build times is usually the end-to-end time. Talking with @skevy, we were saying a typical production build pipeline will transpile and minify, which previously entailed running Babel (ex: with es2015 preset) and then Uglify. But now a pipeline could run just Babel (ex: with es2015 + babili).

The perf benchmarks currently make Uglify look way better than Babili to people who prefer 1.5-2x faster build times for roughly the same end result, but if the actual end-to-end build times that comprise transpilation and minification are faster, that'd change a lot of minds.

help wanted

Most helpful comment

I gave it a try in a local branch. For the 619 lodash-es JavaScript files, I calculated the Transpile + Minification time and got the following averages:

capture d ecran 2016-09-01 a 00 58 14

Considering that:

  • the babili pipeline is a babel.transform with the es2015 and babili presets
  • the uglify pipeline is a babel.transform with the es2015 preset + uglify

Also, I haven't (yet) managed to get it work with Google Closure Compiler since ES6 import and export are a bit tricky (cf this issue). But I'll keep working on it !

Any feedbacks so far ?

All 2 comments

If you want a good before and after you could compare lodash-es as it has hundreds of modules that can be transpiled to cjs+uglify compared to just babili minified.

I gave it a try in a local branch. For the 619 lodash-es JavaScript files, I calculated the Transpile + Minification time and got the following averages:

capture d ecran 2016-09-01 a 00 58 14

Considering that:

  • the babili pipeline is a babel.transform with the es2015 and babili presets
  • the uglify pipeline is a babel.transform with the es2015 preset + uglify

Also, I haven't (yet) managed to get it work with Google Closure Compiler since ES6 import and export are a bit tricky (cf this issue). But I'll keep working on it !

Any feedbacks so far ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jamesloewen picture jamesloewen  路  3Comments

developit picture developit  路  5Comments

GabbeV picture GabbeV  路  3Comments

boopathi picture boopathi  路  3Comments

babel-bot picture babel-bot  路  3Comments