Skip to content

Conversation

@hyf0
Copy link
Member

@hyf0 hyf0 commented Oct 25, 2025

Part of #6346.

import { freeExternalMemory } from 'rolldown/experimental';

const output = await bundle.generate();

freeExternalMemory(output)
  • Accessing chunk properties after freeing will throw an error

Copy link
Member Author

hyf0 commented Oct 25, 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.

@hyf0 hyf0 marked this pull request as ready for review October 25, 2025 17:55
@graphite-app graphite-app bot changed the base branch from 10-26-refactor_node_only_call_transformtorollupoutput_when_needed to graphite-base/6696 October 25, 2025 17:56
@github-actions
Copy link
Contributor

github-actions bot commented Oct 25, 2025

Benchmarks Rust

  • target: main(708c17d)
  • pr: 10-26-feat_experimental_introduce_freeexternalmemory_to_free_external_memory_immediately(014c762)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.00     66.7±1.37ms        ? ?/sec    1.02     68.1±1.48ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.01     74.9±1.79ms        ? ?/sec    1.00     74.3±1.65ms        ? ?/sec
bundle/bundle@rome_ts                                        1.00    109.7±2.29ms        ? ?/sec    1.02    112.1±2.55ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.00    122.5±1.86ms        ? ?/sec    1.01    123.7±1.61ms        ? ?/sec
bundle/bundle@threejs                                        1.01     41.0±2.64ms        ? ?/sec    1.00     40.7±0.61ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.00     43.6±0.62ms        ? ?/sec    1.02     44.5±0.80ms        ? ?/sec
bundle/bundle@threejs10x                                     1.00    401.3±4.87ms        ? ?/sec    1.00    399.7±4.85ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.00    460.3±3.10ms        ? ?/sec    1.00    460.1±4.81ms        ? ?/sec
scan/scan@rome_ts                                            1.00     88.3±1.57ms        ? ?/sec    1.00     88.5±1.51ms        ? ?/sec
scan/scan@threejs                                            1.02     29.9±1.94ms        ? ?/sec    1.00     29.3±0.35ms        ? ?/sec
scan/scan@threejs10x                                         1.00    303.7±4.01ms        ? ?/sec    1.00    304.4±4.46ms        ? ?/sec

@graphite-app graphite-app bot force-pushed the 10-26-feat_experimental_introduce_freeexternalmemory_to_free_external_memory_immediately branch from e6185ec to fd671d8 Compare October 25, 2025 18:12
@graphite-app graphite-app bot force-pushed the graphite-base/6696 branch from dcdad8a to 058627d Compare October 25, 2025 18:12
@graphite-app graphite-app bot changed the base branch from graphite-base/6696 to main October 25, 2025 18:12
@graphite-app graphite-app bot force-pushed the 10-26-feat_experimental_introduce_freeexternalmemory_to_free_external_memory_immediately branch from fd671d8 to abd951f Compare October 25, 2025 18:12
@netlify
Copy link

netlify bot commented Oct 25, 2025

Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit 014c762
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/68fef371aac5bd0008c56c57
😎 Deploy Preview https://deploy-preview-6696--rolldown-rs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@hyf0 hyf0 force-pushed the 10-26-feat_experimental_introduce_freeexternalmemory_to_free_external_memory_immediately branch from abd951f to c742b25 Compare October 26, 2025 12:03
@hyf0 hyf0 force-pushed the 10-26-feat_experimental_introduce_freeexternalmemory_to_free_external_memory_immediately branch from c742b25 to 014c762 Compare October 27, 2025 04:22
@hyf0
Copy link
Member Author

hyf0 commented Oct 27, 2025

I want keep the compleness for future references. So continue at #6721.

@hyf0 hyf0 closed this Oct 27, 2025
graphite-app bot pushed a commit that referenced this pull request Oct 27, 2025
…emory immediately (#6721)

This PR consolidates #6707 and #6696. Part of #6346.

```typescript
import { freeExternalMemory } from 'rolldown/experimental';

const bundle = await build.generate();

freeExternalMemory(bundle)

bundle.output // error
```

```typescript
import { freeExternalMemory } from 'rolldown/experimental';

const bundle = await build.generate();

freeExternalMemory(bundle, /*keepDataAlive:*/ true)

bundle.output // no error
```
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.

3 participants