Partial builds are slow in Webpack 3.2.0

Do you want to request a feature or report a bug?


What is the current behavior?

Partial builds are slow in Webpack 3 compared to Webpack 2

If the current behavior is a bug, please provide the steps to reproduce.

I just upgraded webpack in my project (based on vue-webpack template) from v2.6.1 to the latest v3.2.0. The partial build time became much slower, from previous ~1.7 sec it’s now ~5.5 sec. Initial builds are same ~55 sec.

Also tried to upgrade webpack-dev-middleware from ^1.10.0 to ^1.11.0 and webpack-hot-middleware from ^2.18.0 to ^2.18.2. Didn’t help.

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.

Node 8.0.0, yarn 0.24.5, macOS Sierra, package.json, no SSR enabled

Author: Fantashit

2 thoughts on “Partial builds are slow in Webpack 3.2.0

  1. Keeping old numbers, but upgrading to 3.3.0 and re-running builds:

    Activity 2.4 3.2 3.3
    Prod build (e.g. full optimizations, minify, gzip) 111.47s 96.75s 100.04s
    Local dev builds (e.g. watch mode, hot module, no minify) 88.28s 66.84s 78.40s
    Partial rebuild (comment out random import, then uncomment) 5.16s 8.32s 1.34s

    I noticed the very first partial rebuild was about 5s (on par with 2.4) but a subsequent re-builds hovered around the 1-1.5s range. Since rebuild time for development mode is our biggest thing, this is huge win. Thanks @sokra!

    (I’m itching to use the next version of Babel with their parser speed improvements and see how much more it drops build times, as well as I’m starting to investigate DLLs to increase build speeds given how aggressive our vendor bundle is)

Comments are closed.