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
Incremental build performance issues #20
Comments
Could adding
to the loader help? https://webpack.js.org/api/loaders/#thiscacheable I don't understand for sure from the docs if it's the default or if calling it without argument is the default. @IronSean mind checking if putting this line here helps: |
Incremental builds adding and removing a character from a component took 14, 13, 11.5, and 11 seconds with |
Here is the output from the incremental build using With RRWP
Without WWRP
A lot of those files are building in 290ms where as without RRWP they're building 0-3ms. Assuming this hold for the Is there a way I can get some more fine grained breakdown of these builds? I might see if I can repeat this is a small barebones repo for easier testing. |
Was running into the same problem with a pretty large webpack project. It looks like for some reason the |
@gaearon I was wrong, my run command was triggering @mmhand123 's solution of removing the line 21 also works:
|
Unfortunately in the project I'm working in the |
@IronSean what do you think about using the other solution as the proposed fix since it works for both of us? |
I'd want to know what it's doing and if it would cause causing any other issues by removing it. Ultimately that's probably for @pmmmwh to answer since I don't know myself. It seemed to work fine without it on my env but I didn't test robustly. That's odd that |
Yeah definitely. I actually ended up moving the require outside of the loader along with removing the dependency. I'll make a pr too for @pmmmwh to look at whenever there's free time! |
Both solutions work for my project to similar results, but your fix does perform significantly better in the small Kitchen Sink demo, If that single import doesn't cause any other issues I'd say that's the better solution. |
I don't have time to look at this until Sunday night, but from what I read from the Webpack docs, removing Moving the require outside of the loader should further ensure better caching since Node will cache it. |
I'm experiencing some incremental build performance issues. These are taken by sampling the Time output from webpack incremental builds.
RRWP+babel+ts-loader+ForkTsCheckerWebpackPlugins: 11-17 s
RRWP+babel+ts: 9-16 s
babel+ts-loader+ForkTsCheckerWebpackPlugin: 1.8-2.0s
babel+ts-loader: 1.5s-1.7s
babel: 1.4-2.1 s
ts-loader+ForkTsCheckerWebpackPlugin: 1.1-1.9 s
It looks like RRWP is adding 8-15 seconds build time to my typescript react project.
The config is as follows:
webpack.common.js
and webpack.dev.js
The text was updated successfully, but these errors were encountered: