Skip to content

chore: Fix bundle benchmarks to preload bench cases into memfs#13390

Draft
hardfist wants to merge 4 commits intomainfrom
codex/rust-memfs
Draft

chore: Fix bundle benchmarks to preload bench cases into memfs#13390
hardfist wants to merge 4 commits intomainfrom
codex/rust-memfs

Conversation

@hardfist
Copy link
Contributor

Summary

  • Preload each bundle benchmark project into MemoryFileSystem before running the benchmark group
  • Replace native input filesystem reads with a walkdir copy of the bench case tree into memfs
  • Disable symlink resolution for these benchmarks and add walkdir to the benchmark tooling dependencies

Testing

  • cargo check -p rspack_benchmark --benches
  • cargo fmt --all --check
  • cargo clippy -p rspack_benchmark --benches -- -D warnings

@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Mar 17, 2026
@hardfist hardfist changed the title Fix bundle benchmarks to preload bench cases into memfs chore: Fix bundle benchmarks to preload bench cases into memfs Mar 17, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2026

📦 Binary Size-limit

Comparing a805b8d to chore(deps): update patch crates (#13393) by renovate[bot]

🙈 Size remains the same at 48.72MB

@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2026

Rsdoctor Bundle Diff Analysis

Found 5 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Change
react-10k 5.7 MB 0
react-1k 826.2 KB 0
react-5k 2.7 MB 0
rome 984.2 KB 0
ui-components 2.3 MB 0

Generated by Rsdoctor GitHub Action

@hardfist
Copy link
Contributor Author

@codex fix ci

@chatgpt-codex-connector
Copy link

Summary

  • Added defensive handling in benchmark project preloading so recursive directory hydration no longer aborts when an entry is a symlink that resolves to NotFound; those entries are now skipped while all other errors still fail fast. This targets CI robustness for memfs-preloaded bundle benchmarks. xtask/benchmark/benches/groups/bundle/util.rsL183-L199
  • Added is_ignored_symlink_error helper to explicitly gate the ignore-path to NotFound + symlink metadata, avoiding accidental suppression of unrelated I/O failures. xtask/benchmark/benches/groups/bundle/util.rsL238-L246

Testing

  • ⚠️ curl -L --max-time 10 "https://duckduckgo.com/html/?q=rspack+benchmark+memfs+walkdir+clippy+ci" | head -n 20 (network proxy returned 403, so web search could not complete in this environment)
  • cargo fmt --all --check
  • cargo check -p rspack_benchmark --benches
  • cargo clippy -p rspack_benchmark --benches -- -D warnings

Also completed follow-up workflow requirements:

  • Committed on current branch: f29b516c
  • Opened a follow-up PR via make_pr with title: fix: handle broken symlinks in benchmark memfs preload for CI

View task →

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 18, 2026

Merging this PR will not alter performance

✅ 16 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing codex/rust-memfs (a805b8d) with main (74579fc)

Open in CodSpeed

Footnotes

  1. 3 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.

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

Labels

team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant