-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Large resolve.extensions make build process slower significantly #5205
Comments
Hey @tai2 , I tried your sample repository to reproduce the issue.
With `webpack 3.1.0 also I got similar result with a difference of 2-3 seconds between the two runs. |
@pksjce Thanks for trying it. What's your node.js version? |
I tried it on another ubuntu environment, the issue was not reproduced. 🤔 🤔 🤔 |
I'm using v7.2.0. Will that make a difference? I also tried this directly on webpack's resolver which is https://github.com/webpack/enhanced-resolve . I tried it with 2-13 extensions and found similar perf differences of couple of seconds only. |
I asked few people to run the sample program. |
Node's version is 8.1.0 and webpack is 3.1.0. 2 extensions
13 extensions
Is there a possibility of your machine problem? |
I got it. You can reproduce the problem on the environment below.
I had a symbolic link I don't understand why this caused performance problem. But this issue is probably my specific problem and rarely occurs to others. |
Do you want to request a feature or report a bug?
bug
(or feature, not sure)
What is the current behavior?
I have an webpack config which contains many elements in
resolve.extensions
(13 extentions).This file was generated by webpacker on default configuration.
This increases build time significantly compared to fewer extentions.
To make matters worse, it causes heap allocation error in my real project then I cannot build the app.
An example of build time measurements of a project:
resolve.extentions
If the current behavior is a bug, please provide the steps to reproduce.
https://github.com/tai2/webpack-build-time-increase-example
What is the expected behavior?
Reasonable build time regardlress of
resolve.extenions
.O(1) or O(N) algorithm if it's possible.
If this is a feature request, what is motivation or use case for changing the behavior?
Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
Node.js: v8.1.2
webpack: 3.0.0
OS: Darwin Kernel Version 16.6.0
CPU: Core i7 3.1GHz
RAM: 16GB
The text was updated successfully, but these errors were encountered: