refactor: introducing the faster code-splitting algorithm#8823
Merged
JSerFeng merged 5 commits intoweb-infra-dev:mainfrom Jan 20, 2025
Merged
refactor: introducing the faster code-splitting algorithm#8823JSerFeng merged 5 commits intoweb-infra-dev:mainfrom
JSerFeng merged 5 commits intoweb-infra-dev:mainfrom
Conversation
✅ Deploy Preview for rspack canceled.Built without sensitive environment variables
|
CodSpeed Performance ReportMerging #8823 will not alter performanceComparing Summary
|
dab14a8 to
d4e7793
Compare
d4e7793 to
159fb7d
Compare
JSerFeng
commented
Jan 4, 2025
ac5893a to
4526881
Compare
Contributor
|
maybe we should add a benchmark case with lots of dynamic import module first and to see the bench metrics avoid future regression |
Contributor
|
📝 Benchmark detail: Open
|
bca01bd to
706ae15
Compare
ahabhgk
previously approved these changes
Jan 10, 2025
4a23903 to
4ea7c45
Compare
4ea7c45 to
91c3ff2
Compare
25c0c61 to
391f835
Compare
391f835 to
d308f3e
Compare
d308f3e to
425c331
Compare
ahabhgk
approved these changes
Jan 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Change the algorithm of code-splitting.
Making it more maintainable, concurrent and easy to working with incoming incremental arch.
Because of the multi-threads, now the code-splitting is more performant than before even using single thread. There can be a huge improvement on large repo.
There is a internal test project which contains about 1.5 million chunk modules, using many dynamic imports, costs about 1200 ms to complete a whole code-splitting phase, using the new algorithm on my 15 core MacBook Pro M1, only takse 600 ms to finish !
The detailed benchmark data will be present soon
Checklist