Avatar for the rolldown user
rolldown
rolldown
BlogDocsChangelog

Performance History

Latest Results

chore(deps): update dependency rust to v1.95.0
renovate/rust-toolchain
3 hours ago
fix: reduce false positives in chunk optimizer circular dependency detection (#9049) ## Summary PR #8371 improved circular dependency detection in the chunk optimizer to fix #8361 (`__commonJSMin is not a function`). However, the fix introduced an over-approximation that blocks many legitimate chunk merges, causing a significant regression in bundle size and file count. Fixes #9093 ## Problem The current algorithm in `would_create_circular_dependency` does a BFS from `source.deps ∪ target.deps` and simulates post-merge edges for **every** chunk that depends on source. This causes false positives because: 1. Starting BFS from `target.deps` means target can trivially "reach itself" through any transitive dependency that also depends on source 2. The post-merge edge simulation amplifies this by redirecting any source-dependent chunk back to target In a large application with ~2,200 entry points, this blocks **1,046 legitimate merges**, producing **+1,224 extra chunks** and **+8% bundle size**. ## Fix Split the algorithm into two cases based on whether source has dependencies: - **Source has deps**: Only BFS from `source.deps` without post-merge simulation. This is sufficient because if target is reachable from source's dependency tree, merging would create a real cycle. - **Source has no deps** (e.g., runtime chunk): Keep the full algorithm with `target.deps` BFS and post-merge simulation. This correctly detects cycles like `target → chunk_A → source(=target after merge)`, which is the pattern from #8361. ## Results Tested on a large application (~2,200 entry points): | Metric | Before (rc.9) | After (this fix) | Improvement | |--------|--------------|-------------------|-------------| | JS files | 3,212 | 2,418 | **-794 (-25%)** | | JS size | 73.13 MB | 63.99 MB | **-9.14 MB (-12.5%)** | ## Testing - āœ… `#8361` and `#8361_2` integration tests pass (the bug this algorithm was designed to fix) - āœ… Full integration test suite: **1,652 passed**, 0 failed (1 skipped due to missing test262 submodule) - āœ… New regression test added (`#9049`) - āœ… Verified on large production application Fixes vitejs/vite#22007 --------- Co-authored-by: Alon Mizrahi <almizrahi@paloaltonetworks.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: IWANABETHATGUY <iwanabethatguy@qq.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
main
15 hours ago
Merge branch 'main' into 04-10-fix_rolldown_plugin_vite_manifest_handle_duplicate_chunk_names_for_css_entries
04-10-fix_rolldown_plugin_vite_manifest_handle_duplicate_chunk_names_for_css_entries
15 hours ago

Latest Branches

CodSpeed Performance Gauge
+1%
chore(deps): update dependency rust to v1.95.0#9140
3 hours ago
2fbef98
renovate/rust-toolchain
CodSpeed Performance Gauge
-1%
fix(plugin/copy-module): honor external resolutions from other plugins#9139
6 hours ago
7e4c15a
TheAlexLichter:fix/copy-module-tolerate-missing
CodSpeed Performance Gauge
0%
16 hours ago
a77d9ed
04-10-fix_rolldown_plugin_vite_manifest_handle_duplicate_chunk_names_for_css_entries
Ā© 2026 CodSpeed Technology
Home Terms Privacy Docs