perf: parallel process referenced module of flag usage plugin#11145
Merged
LingyuCoder merged 2 commits intomainfrom Jul 23, 2025
Merged
perf: parallel process referenced module of flag usage plugin#11145LingyuCoder merged 2 commits intomainfrom
LingyuCoder merged 2 commits intomainfrom
Conversation
✅ Deploy Preview for rspack canceled.
|
Contributor
Contributor
📦 Binary Size-limit
❌ Size increased by 32.38KB from 49.00MB to 49.03MB (⬆️0.06%) |
CodSpeed Performance ReportMerging #11145 will not alter performanceComparing Summary
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR optimizes the flag dependency usage plugin by introducing parallel processing for referenced modules that don't have nested exports, while keeping sequential processing for modules with nested exports that require module graph mutations.
Key changes:
- Separates modules into nested and non-nested tasks based on export complexity
- Processes non-nested modules in parallel using
rayon - Adds optimized methods for parallel processing without redirect handling
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| flag_dependency_usage_plugin.rs | Implements parallel processing logic by categorizing and processing non-nested modules concurrently |
| exports_info_setter.rs | Adds specialized methods for parallel processing that bypass redirect handling |
crates/rspack_plugin_javascript/src/plugin/flag_dependency_usage_plugin.rs
Show resolved
Hide resolved
crates/rspack_plugin_javascript/src/plugin/flag_dependency_usage_plugin.rs
Show resolved
Hide resolved
ahabhgk
approved these changes
Jul 23, 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
Parallelize process referenced module in flag usage exports just like #11110 when:
redirect_toBefore:

After:

Related links
Checklist