-
-
Notifications
You must be signed in to change notification settings - Fork 389
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
Slow rebuild whis many async chunks #1002
Comments
Can you profile more and look what is slow on webpack side here? Also can you provide versions (latest?)? |
Looks like the initial cause is how webpack visit modules for dynamic imports, this code in buildChunkGraph creates a very long queue. For a server build, we use babel-plugin-dynamic-import-node, so every dynamic For client build, we can't do this, because need to have all of this components in stats, and our |
Interesting fact, Need to make more tests, but looks like it will resolve our problem) |
Yeah, |
Interesting thing here is that
Okay, thanks! |
In this case webpack removes unused modules, so graph is less, so less time on it, maybe we have a sutiation where you can a lot of extra and unnecessary modules, sometimes it happens, especial in big projects For fast solution - do you use cache (filesystem)? It will improve perf even in development mode (even with a lot of modules which will be dropped in future) |
Have the same thoughts)
Yes, must have feature. Thanks for the answers! |
@SuperOleg39 Wierd, it should work... Can you create small example? I will look, also you can |
There is a ready for reproduction repo
We have a two parallel builds for browser and server, and if we will enable |
I mean only for the |
Thanks a lot! |
Bug report
Hello!
Have a huge size application, with 180+ dynamic imports (a lot of pages).
Saw a very slow rebuild, after profiling found one of a build performance bottlelneck where method getAllAsyncChunks are called.
CPU-20221202T124255.cpuprofile.zip
Actual Behavior
On any change in any file in application,
mini-css-extract-plugin
spend a lot of time to create hashesExpected Behavior
mini-css-extract-plugin
create hashes only for changed filesHow Do We Reproduce?
Unfortunately, project is in private repo.
We are using webpack@5
The text was updated successfully, but these errors were encountered: