-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enabling the plugin causes a significant build performance regression #54
Comments
Hey @niieani So a regression of 6x speed is definitely unexpected. Would it be possible for you to share your webpack config? Or ideally, link to a full workspace demonstrating the problem? SMP should cause a slight speed regression (measuring isn't free), so I wouldn't recommend having SMP "on" by default. But yes, as I say - 6x speed regression is too much. |
i also had the same problem, i removed all the plugins and add them one at time to find which one cause the regression |
Hi @stephencookdev. Our config is dynamically generated and pretty complex, with some proprietary plugins and loaders. Sadly, I don't think I'll have the resources to do anything meaningful in this regard in the foreseeable future :( |
Same here! Using the HardSourceWebpackPlugin and your plugin, it's crazy slow. What can I provide to help you debug? |
Same here, went from 57s to 249s {
context: path.resolve('some/folder'),
entry: {
module1: ['./module1/index.js'],
module2: ['./module2/index.js'],
module3: ['./module3/index.js'],
module4: ['./module4/index.js'],
module5: ['./module5/index.js']
},
output: {
filename: '[name].js',
path: path.resolve(projectRoot, 'build', 'js'),
chunkFilename: '[name].js',
publicPath: '../js/'
},
module: {
rules: [
{ test: /backbone\.js$/, loader: 'imports-loader?define=>false' }, // turn off Webpack's AMD detection
{
test: /\.js$/,
loader: 'babel-loader',
options: {
compact: false,
cacheDirectory: channel === 'dev'
},
exclude: [path.resolve('some/folder', 'node_modules')]
},
{
test: /\.scss$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: ['css-loader', 'sass-loader']
})
},
{
test: /\.(woff2|jpg|svg|png)$/,
loader: 'url-loader'
}
]
},
resolveLoader: { modules: [path.resolve('some/folder', 'node_modules')] },
resolve: { alias: { 'querystring': path.resolve('some/folder/node_modules', 'querystring-browser') } },
stats: 'verbose',
plugins: [
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor-ui',
chunks: ['module1', 'module2', 'module3'],
minChunks: 3 // Extract out common modules present in all the above three chunks
}),
new webpack.optimize.CommonsChunkPlugin({
name: 'module1',
async: 'CommonLazyChunk',
deepChildren: true,
minChunks: (module, count) => {
return !(module.resource && (/brace\/worker/).test(module.resource)) && count >= 2;
}
}),
new ExtractTextPlugin('[name].css'),
new webpack.IgnorePlugin(/^\.\/locale$/), // Ignore moment locale file
new webpack.IgnorePlugin(/^jquery$/),
new DuplicatePackageCheckerPlugin({
verbose: true
}),
new webpack.ProvidePlugin({ _: 'lodash' }),
new webpack.ExternalsPlugin('commonjs', [
'electron',
'fs',
'os',
'child_process',
'path',
'zlib'
])
]
} |
yeah, i tried your plugin and my build times went from 50 to 90 seconds. feel free to clone this repo if you want to see the difference, https://github.com/BlackFenix2/Portfolio |
Our ~3 minute build takes 30+ minutes with this plugin enabled, it then emits the files and doesn't quit or output any speed measurements. |
Same here, making this plugin completely pointless, too bad. |
One small data point: I also had build times grow to 90+ minutes when adding |
Hi Stephen,
This seemed like a pretty useful concept, however - when I tried it and enabled the plugin, the build times went from 160 seconds to over 1000 seconds for a full build of our app.
This means that just having the plugin enabled, has caused over a 6x regression in speed. Additionally, the times it measured did not seem accurate, e.g. a plugin which simply adds a property to some modules was measured to have taken 40 seconds (I don't think it's possible that adding a property, even if to over 8000 modules, should take this much time).
Any ideas on what might be going wrong?
The text was updated successfully, but these errors were encountered: