Skip to content

perf: parallel process referenced module of flag usage plugin#11145

Merged
LingyuCoder merged 2 commits intomainfrom
perf/parallel-process-referenced-module
Jul 23, 2025
Merged

perf: parallel process referenced module of flag usage plugin#11145
LingyuCoder merged 2 commits intomainfrom
perf/parallel-process-referenced-module

Conversation

@LingyuCoder
Copy link
Contributor

@LingyuCoder LingyuCoder commented Jul 23, 2025

Summary

Parallelize process referenced module in flag usage exports just like #11110 when:

  • the exports info data does not have redirect_to
  • the referenced exports do not have nested names which to infer the nested exports infos.

Before:
image

After:
image

Related links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@netlify
Copy link

netlify bot commented Jul 23, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 52bcebb
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/68809d81ed2dd000085851e2

@github-actions github-actions bot added release: performance release: performance related release(mr only) team The issue/pr is created by the member of Rspack. labels Jul 23, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jul 23, 2025

📝 Ecosystem CI detail: Open

suite result
rslib ❌ failure
rsdoctor ✅ success
modernjs ✅ success
examples ❌ failure
plugin ✅ success
rspress ✅ success
rsbuild ❌ failure
devserver ✅ success
lynx-stack ❌ failure
nuxt ✅ success

@github-actions
Copy link
Contributor

github-actions bot commented Jul 23, 2025

📦 Binary Size-limit

Comparing 52bcebb to fix: external resolve esm module (#11144) by Cong-Cong Pan

❌ Size increased by 32.38KB from 49.00MB to 49.03MB (⬆️0.06%)

@codspeed-hq
Copy link

codspeed-hq bot commented Jul 23, 2025

CodSpeed Performance Report

Merging #11145 will not alter performance

Comparing perf/parallel-process-referenced-module (52bcebb) with main (2622024)

Summary

✅ 16 untouched benchmarks

@LingyuCoder LingyuCoder marked this pull request as ready for review July 23, 2025 08:07
Copilot AI review requested due to automatic review settings July 23, 2025 08:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@LingyuCoder LingyuCoder requested review from JSerFeng and ahabhgk July 23, 2025 09:07
@LingyuCoder LingyuCoder enabled auto-merge (squash) July 23, 2025 09:10
@LingyuCoder LingyuCoder merged commit 5744578 into main Jul 23, 2025
44 checks passed
@LingyuCoder LingyuCoder deleted the perf/parallel-process-referenced-module branch July 23, 2025 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: performance release: performance related release(mr only) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants