问个 webpack happypack 服务器多线程打包超长时间的问题

2019-03-22 12:57:23 +08:00
 pkwenda

问个问题: 前端打包,webpack happypack 做了多线程的优化 cpu x 处理器 6 核 12 线程 主频 3.0 的,打包 30 分钟 我的 mac pro 4 核 8 线程 主频 2.6 的打包 300s


除了主频还有什么是什么影响 cpu 计算速度?

    Entrypoint mini-css-extract-plugin = *
       5 modules
[WEBPACK] Building 2 targets
[WEBPACK] Started building static/js/renderer.[chunkhash].js
[WEBPACK] Started building static/js/renderer.[chunkhash].js
Happy[happyBabel]: Version: 5.0.1. Threads: 2 (shared pool)
(node:7022) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
Happy[happyBabel]: Version: 5.0.1. Threads: 2 (shared pool)
(node:7016) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
Happy[happyBabel]: All set; signaling webpack to proceed.
Happy[happyBabel]: All set; signaling webpack to proceed.
Node#moveTo was deprecated. Use Container#append.
Node#moveTo was deprecated. Use Container#append.
[WEBPACK] Finished building static/js/renderer.[chunkhash].js within 1960.241 seconds
[WEBPACK] Finished building static/js/renderer.[chunkhash].js within 2574.375 seconds
[WEBPACK] Finished build after 2578.462 seconds
  Build complete.



日志上看 Happy 是启动了的,但是设置的自动,看起来

Version: 5.0.1. Threads: 2 

只开启了两个线程,但是 40minn 也很离谱

V 友们能帮助给点思路吗?

2147 次点击
所在节点    问与答
1 条回复
pkwenda
2019-03-23 19:42:35 +08:00
up

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/547373

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX