Skip to content

Comments

feat: optimize dynamic entry facade chunks by merging with common chunks when they are captured by common chunks#7486

Merged
graphite-app[bot] merged 1 commit intomainfrom
12-11-feat_5276
Dec 22, 2025
Merged

feat: optimize dynamic entry facade chunks by merging with common chunks when they are captured by common chunks#7486
graphite-app[bot] merged 1 commit intomainfrom
12-11-feat_5276

Conversation

@IWANABETHATGUY
Copy link
Member

@IWANABETHATGUY IWANABETHATGUY commented Dec 14, 2025

related to #5726, #4905

Copy link
Member Author

IWANABETHATGUY commented Dec 14, 2025


How to use the Graphite Merge Queue

Add the label graphite: merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@netlify
Copy link

netlify bot commented Dec 14, 2025

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit 1eb6763
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/693e46b107ef3f0008f70eb7

@netlify
Copy link

netlify bot commented Dec 14, 2025

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit d4f0b36
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/6948d880012fe20008b675ea

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 14, 2025

CodSpeed Performance Report

Merging #7486 will not alter performance

Comparing 12-11-feat_5276 (d4f0b36) with main (552e271)1

Summary

✅ 8 untouched

Footnotes

  1. No successful run was found on main (d4f0b36) during the generation of this report, so 552e271 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 14, 2025

Benchmarks Rust

group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.01     63.9±1.54ms        ? ?/sec    1.00     63.0±1.21ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.01     70.1±2.27ms        ? ?/sec    1.00     69.5±1.32ms        ? ?/sec
bundle/bundle@rome_ts                                        1.00    107.2±3.35ms        ? ?/sec    1.00    107.1±1.47ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.00    119.5±1.92ms        ? ?/sec    1.00    119.9±1.46ms        ? ?/sec
bundle/bundle@threejs                                        1.00     39.2±0.56ms        ? ?/sec    1.00     39.2±0.88ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.00     42.9±0.97ms        ? ?/sec    1.00     42.8±0.74ms        ? ?/sec
bundle/bundle@threejs10x                                     1.00    393.1±4.03ms        ? ?/sec    1.00    393.0±4.69ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.00    452.2±3.20ms        ? ?/sec    1.00    452.7±3.82ms        ? ?/sec
scan/scan@rome_ts                                            1.00     84.3±2.48ms        ? ?/sec    1.00     84.2±2.26ms        ? ?/sec
scan/scan@threejs                                            1.01     28.8±1.67ms        ? ?/sec    1.00     28.6±1.06ms        ? ?/sec
scan/scan@threejs10x                                         1.00    294.6±3.55ms        ? ?/sec    1.00    294.9±4.05ms        ? ?/sec

@IWANABETHATGUY IWANABETHATGUY force-pushed the 12-11-feat_5276 branch 3 times, most recently from 00404a0 to a9c63e9 Compare December 17, 2025 09:28
@IWANABETHATGUY IWANABETHATGUY changed the base branch from main to graphite-base/7486 December 17, 2025 14:09
@IWANABETHATGUY IWANABETHATGUY changed the base branch from graphite-base/7486 to 12-17-refactor_make_treeshake_context.is_stmt_info_included_vec_to_inspect_if_a_stmt_info_is_included_after_linking December 17, 2025 14:10
graphite-app bot pushed a commit that referenced this pull request Dec 18, 2025
related to #7486, we need to update the symbol usage after linking stage when merge dynamic chunks to common chunk
IWANABETHATGUY added a commit that referenced this pull request Dec 18, 2025
related to #7486, we need to update the symbol usage after linking stage
when merge dynamic chunks to common chunk
@IWANABETHATGUY IWANABETHATGUY changed the base branch from 12-17-refactor_make_treeshake_context.is_stmt_info_included_vec_to_inspect_if_a_stmt_info_is_included_after_linking to graphite-base/7486 December 18, 2025 13:52
@IWANABETHATGUY IWANABETHATGUY changed the base branch from graphite-base/7486 to 12-18-refactor_use_meta_stmt_info_included_to_check_if_a_stmt_info_is_included December 18, 2025 13:52
@graphite-app graphite-app bot force-pushed the 12-18-refactor_use_meta_stmt_info_included_to_check_if_a_stmt_info_is_included branch 2 times, most recently from 8649da9 to 4883c75 Compare December 18, 2025 17:20
Copilot AI review requested due to automatic review settings December 21, 2025 16:17
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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

Copilot reviewed 23 out of 23 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sapphi-red
Copy link
Member

I wonder if we can reuse the optimization for preserveEntrySignature: 'allow-extension' by treating all dynamic imports to have preserveEntrySignature: 'allow-extension'.

@IWANABETHATGUY
Copy link
Member Author

I wonder if we can reuse the optimization for preserveEntrySignature: 'allow-extension' by treating all dynamic imports to have preserveEntrySignature: 'allow-extension'.

try_insert_common_module_to_exist_chunk differs from optimize_facade_dynamic_entry_chunks.

The first focused on merging common chunks into a dynamic entry chunk, while the second focused on merging dynamic entry chunks into common chunks. The first focused on module assignment; it reduced chunks by pushing modules that should belong to a new common chunk into existing entry chunks, whereas the second focused on chunk merging (the module is already assigned).

Also, the first optimization did not involve any tree-shake status update. I split them up to improve code maintenance and make it easier to review.

I will try to merge the two-pass optimization into a single pass in the future.

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

Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member Author

@sapphi-red I have addressed all the issues you raised. I am going to merge it to avoid further conflicts. Feel free to point out any other issues. I will fix them in future pr.

…nks when they are captured by common chunks (#7486)

related to #5726, #4905
@graphite-app
Copy link
Contributor

graphite-app bot commented Dec 22, 2025

Merge activity

@graphite-app graphite-app bot merged commit d4f0b36 into main Dec 22, 2025
34 checks passed
@graphite-app graphite-app bot deleted the 12-11-feat_5276 branch December 22, 2025 05:44
This was referenced Dec 24, 2025
shulaoda added a commit that referenced this pull request Dec 24, 2025
## [1.0.0-beta.57] - 2025-12-24

✨ TypeScript Project References Support
- Rolldown now supports TypeScript project references when manually specifying a `tsconfig`
- See more details: https://rolldown.rs/options/tsconfig

💥 Rename `__export` to `__exportAll`
- Update `rolldown-plugin-dts` to the latest version for compatibility

### 💥 BREAKING CHANGES

- tsconfig: enable project references support in manual mode (#7545) by @shulaoda

### 🚀 Features

- add `CANNOT_CALL_NAMESPACE` warning (#7636) by @sapphi-red
- add import path for unresolved import diagnostics (#7625) by @sapphi-red
- optimize dynamic entry facade chunks by merging with common chunks when they are captured by common chunks (#7486) by @IWANABETHATGUY

### 🐛 Bug Fixes

- rename `__export` to `__exportAll` to be compatible with `cjs-module-lexer` (#7640) by @IWANABETHATGUY
- strip UTF-8 BOM when using text loader (#7635) by @sapphi-red
- rolldown_plugin_replace: avoid crashing with invalid delimiters (#7621) by @sapphi-red

### 🚜 Refactor

- export all filter functions (#7622) by @sxzz
- allow multiple help messages in diagnostics (#7624) by @sapphi-red

### 📚 Documentation

- add README.md to packages/rolldown (#7556) by @Copilot

### ⚡ Performance

- use fsevents on macOS for file watching (#7596) by @sapphi-red

### 🧪 Testing

- handle re-exports of external modules in CJS format (#7641) by @IWANABETHATGUY
- update integration to use vite's rolldown-canary branch (#7633) by @shulaoda

### ⚙️ Miscellaneous Tasks

- docs: fix Netlify ignore condition to detect docs changes across all PR commits (#7637) by @Copilot
- deps: update rollup submodule for tests to v4.54.0 (#7630) by @sapphi-red
- skip benchmarks for PRs with 'graphite: merge-when-ready' label (#7631) by @Boshen
- deps: update esbuild for tests to 0.27.2 (#7629) by @sapphi-red
- fix "update-test-dependencies" workflow (#7628) by @sapphi-red
- deps: update test262 submodule for tests (#7626) by @sapphi-red
- deps: update dependency oxlint to v1.35.0 (#7623) by @renovate[bot]

Co-authored-by: shulaoda <[email protected]>
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.

4 participants