使用babel includePolyfill构建缓慢的ember cli

时间:2016-02-19 21:34:17

标签: ember.js ember-cli babeljs

为什么babel这么慢includePolyfill: true

我有最新版本的 " ember-cli":" 2.3.0" 和 " ember-cli-babel":" ^ 5.1.5"

Build successful - 126129ms.

Slowest Trees                                 | Total
----------------------------------------------+---------------------
Babel                                         | 38205ms
JSHint app- QUnit                             | 36606ms
Babel                                         | 29282ms

Slowest Trees (cumulative)                    | Total (avg)
----------------------------------------------+---------------------
Babel (14)                                    | 77556ms (5539 ms)
JSHint app- QUnit (1)                         | 36606ms

没有polyfill

Build successful - 6896ms.

Slowest Trees                                 | Total
----------------------------------------------+---------------------
Babel                                         | 452ms

Slowest Trees (cumulative)                    | Total (avg)
----------------------------------------------+---------------------
Babel (14)                                    | 1797ms (128 ms)
Funnel: Addon JS (9)                          | 555ms (61 ms)

1 个答案:

答案 0 :(得分:1)

使用'includePolyfill'时Babel速度较慢,因为它必须比通常更多地处理JS!