Skip to content

perf: verify rstackjs/rspack-resolver#275 (std::fs in FileSystemOs) via CodSpeed#14337

Closed
stormslowly wants to merge 1 commit into
mainfrom
perf/verify-resolver-275-std-fs
Closed

perf: verify rstackjs/rspack-resolver#275 (std::fs in FileSystemOs) via CodSpeed#14337
stormslowly wants to merge 1 commit into
mainfrom
perf/verify-resolver-275-std-fs

Conversation

@stormslowly

@stormslowly stormslowly commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Why

Verification PR for rstackjs/rspack-resolver#275, which replaces tokio::fs with std::fs in FileSystemOs and showed -22.9% aggregate estimated cycles on the resolver's own benches.

This PR patches rspack_resolver to that branch's head (b9eb9b8) via [patch.crates-io] so rspack's CodSpeed benches measure the end-to-end impact inside rspack builds.

Not intended to be merged — once verified, the resolver PR should land and be released, then rspack bumps the version normally.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Binary Size-limit

Comparing 171e2e3 to feat: support rspack magic comment prefix (#14323) by AsyncIter

🎉 Size decreased by 12.00KB from 62.60MB to 62.59MB (⬇️0.02%)

@github-actions

Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

Found 5 projects in monorepo, 2 projects with changes.

📊 Quick Summary
Project Total Size Gzip Size Change Gzip Change
popular-libs 1.7 MB 551.3 KB -26.0 B (-0.0%) -27.0 B (-0.0%)
react-10k 5.6 MB 1.3 MB 0 0
react-1k 822.8 KB 218.3 KB 0 0
react-5k 2.7 MB 669.1 KB 0 0
ui-components 4.8 MB 1.4 MB -28.0 B (-0.0%) -9.0 B (-0.0%)
📋 Detailed Reports (Click to expand)

📁 popular-libs

Path: ../build-tools-performance/cases/popular-libs/dist/rsdoctor-data.json

📌 Baseline Commit: b04d9f41ab | PR: #14323

Metric Current Baseline Change
📊 Total Size 1.7 MB 1.7 MB -26.0 B (-0.0%)
🗜️ Gzip Size 551.3 KB 551.3 KB -27.0 B (-0.0%)
📄 JavaScript 1.7 MB 1.7 MB -26.0 B (-0.0%)
🎨 CSS 0 B 0 B 0
🌐 HTML 289.0 B 289.0 B 0
📁 Other Assets 0 B 0 B 0

📦 Download Diff Report: popular-libs Bundle Diff

📁 ui-components

Path: ../build-tools-performance/cases/ui-components/dist/rsdoctor-data.json

📌 Baseline Commit: b04d9f41ab | PR: #14323

Metric Current Baseline Change
📊 Total Size 4.8 MB 4.8 MB -28.0 B (-0.0%)
🗜️ Gzip Size 1.4 MB 1.4 MB -9.0 B (-0.0%)
📄 JavaScript 4.7 MB 4.7 MB -28.0 B (-0.0%)
🎨 CSS 111.7 KB 111.7 KB 0
🌐 HTML 328.0 B 328.0 B 0
📁 Other Assets 0 B 0 B 0

📦 Download Diff Report: ui-components Bundle Diff

🤖 AI Degradation Analysis (Click to expand)

📁 popular-libs

📊 Size Changes

No meaningful change detected; table skipped per constraints. Total bundle size decreased negligibly by 26 bytes (1,806,629 → 1,806,603). Initial JS chunk also decreased by 26 bytes (1,806,340 → 1,806,314).

🔍 Root Cause Analysis

  • The entire delta stems from mobx@6.16.0, where parsed size dropped from 57,681 to 57,655 bytes.
  • No new modules added or removed; likely build tool noise or minor internal normalization.

⚠️ Risk Assessment

Overall severity: Low

  • Initial chunk size is effectively stable; zero impact on Time to Interactive or load performance.

💡 Optimization Suggestions

  1. No action required; safe to merge.
  2. Continue monitoring mobx imports to ensure only necessary observables are pulled in during future refactors.

Analysis by qwen3.5-plus

📁 ui-components

📊 Size Changes

No significant regressions detected 🎉. Total bundle size decreased marginally from 5,079,179 bytes to 5,079,151 bytes (-28 bytes).

🔍 Root Cause Analysis

  • Negligible parsed size reductions in @ant-design/colors (v6.0.0 and v8.0.1).
  • No new modules or dependencies introduced.

⚠️ Risk Assessment

Overall severity: Low

  • Initial chunk size decreased by 28 bytes; zero impact on load performance.

💡 Optimization Suggestions

  1. No immediate actions required; bundle stability is maintained.
  2. Verify if multiple versions of @ant-design/colors (v6 & v8) are intended to avoid future duplication risks.

Analysis by qwen3.5-plus

Generated by Rsdoctor GitHub Action

@codspeed-hq

codspeed-hq Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚡ 1 improved benchmark
❌ 1 regressed benchmark
✅ 50 untouched benchmarks
⏩ 40 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation js@collect imported identifiers 222.4 µs 228.3 µs -2.6%
Simulation js@external getResolve 1.5 ms 1.4 ms +5.3%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing perf/verify-resolver-275-std-fs (171e2e3) with main (b04d9f4)

Open in CodSpeed

Footnotes

  1. 40 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@stormslowly

Copy link
Copy Markdown
Contributor Author

Verification result: no measurable impact on rspack builds

Local callgrind (Linux x86_64, CodSpeed simulation flags, RAYON_NUM_THREADS=1) comparing base 2ab2da29fa vs this branch across all benches scenarios: +0.17% total estimated cycles — flat within noise. Largest resolver-heavy case build_module_graph: +0.40%. CodSpeed CI agrees ("will not alter performance"; the +5.3% on js@external getResolve is the one path that does benefit, see below).

Why the resolver-side -23% does not transfer

rspack never instantiates the resolver's default FileSystemOs for builds — it injects its own filesystem via ResolverGeneric::new_with_file_system(BoxFS) (crates/rspack_core/src/resolver/boxfs.rs), so rstackjs/rspack-resolver#275's change is dead code on the hot build path.

FileSystemOs IS used by:

  • the standalone napi resolver API (crates/rspack_binding_api/src/rspack_resolver/mod.rs) — matches the js@external getResolve improvement
  • the persistent-cache build-deps helper

Additionally, callgrind shows resolver fs machinery (BoxFS meta/realpath futures) at only ~0.02–0.04% of instructions in rspack's Rust benches, so even porting the same std::fs change into rspack_fs::NativeFileSystem would not move these benchmarks.

Conclusion: rstackjs/rspack-resolver#275 is worth landing for resolver-standalone users and the napi resolve API, but brings no measurable gain to rspack core builds. Closing this verification PR is fine once recorded.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant