V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
pkwenda
V2EX  ›  问与答

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

  •  
  •   pkwenda · 2019-03-22 12:57:23 +08:00 · 2081 次点击
    这是一个创建于 1898 天前的主题,其中的信息可能已经有所发展或是发生改变。

    问个问题: 前端打包,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 友们能帮助给点思路吗?

    1 条回复    2019-03-23 19:42:35 +08:00
    pkwenda
        1
    pkwenda  
    OP
       2019-03-23 19:42:35 +08:00
    up
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2318 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 02:11 · PVG 10:11 · LAX 19:11 · JFK 22:11
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.