Skip to content
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

Optimize performance of chunk graph generation #9472

Merged
merged 4 commits into from Jul 26, 2019

Conversation

sokra
Copy link
Member

@sokra sokra commented Jul 26, 2019

This refactoring adds available modules tracking to the chunk graph generation. This allows to skip a lot of modules in async chunks when modules are already used in all parents. This improves performance when many chunks are used.

Related issues:

#9460
#8644

What kind of change does this PR introduce?
refactoring, performance

Did you add tests for your changes?
existing tests

Does this PR introduce a breaking change?
no

What needs to be documented once your changes are merged?
optimization.removeAvailableModules is no longer recommended, as a similar optimization is included in the chunk graph building. It might still make sense when chunks are merged i. e. with the splitChunks and a constant name.

refactor chunk graph generation to include available modules optimization
We can't disable it in production yet, as this could be a breaking change.
@webpack-bot
Copy link
Contributor

For maintainers only:

  • This need to be documented (issue in webpack/webpack.js.org will be filed when merged)

@webpack-bot
Copy link
Contributor

Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants