【发布时间】:2018-02-11 10:33:43
【问题描述】:
这就是我的 grunt 构建任务执行时间的样子。突然从10-20分钟增加到3个小时。
我可以看到 ngtemplates:dist 和 uglify:generated 占据了大部分的执行时间,但对于 grunt 构建过程来说,3 小时看起来有点过时。它甚至不是那么大的应用程序,而只是一个功能有限的骨架应用程序。
可能的原因是什么?是否有可能减少这种情况?
Execution Time (2018-02-10 09:16:37 UTC-0)
loading tasks 421ms 0%
loading grunt-contrib-clean 4ms 0%
clean:dist 16ms 0%
loading grunt-wiredep 3ms 0%
wiredep:app 279ms 0%
wiredep:test 33ms 0%
loading grunt-usemin 47ms 0%
useminPrepare:html 31ms 0%
loading grunt-concurrent 11ms 0%
concurrent:dist 2.6s 0%
loading grunt-postcss 68ms 0%
postcss:server 120ms 0%
postcss:dist 20ms 0%
loading grunt-...lar-templates 10ms 0%
ngtemplates:dist 44m 6.1s ▇▇▇▇▇▇▇ 24%
loading grunt-contrib-concat 245ms 0%
concat:generated 1.9s 0%
loading grunt-ng-annotate 588ms 0%
ngAnnotate:dist 1m 2s ▇ 1%
loading grunt-contrib-copy 81ms 0%
copy:dist 204ms 0%
loading grunt-contrib-cssmin 849ms 0%
cssmin:generated 2m 12.5s ▇ 1%
loading grunt-contrib-uglify 2.2s 0%
uglify:generated 2h 19m 21.9s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 75%
loading grunt-filerev 154ms 0%
filerev:dist 286ms 0%
usemin:html 164ms 0%
usemin:css 81ms 0%
usemin:js 509ms 0%
loading grunt-contrib-htmlmin 119ms 0%
htmlmin:dist 207ms 0%
swPrecache:production 399ms 0%
ngconstant:production 154ms 0%
Total 3h 6m 54.4s
【问题讨论】:
-
你在回答你自己的问题;您已经确定了导致任务链花费过多时间的任务。如果您需要社区的帮助,您应该将问题的范围重新定义为所讨论的单个任务,并提供有关项目构建的更多背景信息。
标签: gruntjs