Skip to content

perf(core): use dense maps for module graph artifacts#14330

Draft
hardfist wants to merge 2 commits into
web-infra-dev:mainfrom
hardfist:perf/module-graph-dense-dependency-id-map
Draft

perf(core): use dense maps for module graph artifacts#14330
hardfist wants to merge 2 commits into
web-infra-dev:mainfrom
hardfist:perf/module-graph-dense-dependency-id-map

Conversation

@hardfist

@hardfist hardfist commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • use dense storage for module graph dependency id maps
  • store exports info artifact data in an offset dense map keyed by ExportsInfo
  • keep rollback checkpoint/reset behavior through existing rollback wrappers

Tests

  • cargo test -p rspack_core dense_exports_info_map
  • cargo check -p rspack_core

@codspeed-hq

codspeed-hq Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will improve performance by 7.28%

⚠️ 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.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

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

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation rust@create_module_assets 694.3 µs 723 µs -3.96%
WallTime bundle@threejs-10x-development 308.7 ms 245.8 ms +25.56%
Simulation rust@mangle_exports 7.1 ms 6.9 ms +2.39%

Tip

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


Comparing hardfist:perf/module-graph-dense-dependency-id-map (e0d8103) with main (1fd4fca)

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.

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