Skip to content

feat: support OutputChunk#dynamicImports and RenderedChunk#dynamicImp…#1002

Merged
hyf0 merged 4 commits intomainfrom
add-chunk-dynamic-imports
Apr 30, 2024
Merged

feat: support OutputChunk#dynamicImports and RenderedChunk#dynamicImp…#1002
hyf0 merged 4 commits intomainfrom
add-chunk-dynamic-imports

Conversation

@underfin
Copy link
Copy Markdown
Contributor

…orts

Description

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 29, 2024

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit f177403
🔍 Latest deploy log https://app.netlify.com/sites/rolldown-rs/deploys/66309d53591d3e00084b82ac

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.08%. Comparing base (cab8e2b) to head (f177403).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1002      +/-   ##
==========================================
+ Coverage   87.04%   87.08%   +0.04%     
==========================================
  Files         116      116              
  Lines        5737     5755      +18     
==========================================
+ Hits         4994     5012      +18     
  Misses        743      743              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 29, 2024

Benchmarks Rust

group                                      pr                                     target
-----                                      --                                     ------
rolldown benchmark/threejs-bundle          1.00     29.4±0.34ms        ? ?/sec    1.00     29.5±0.74ms        ? ?/sec
rolldown benchmark/threejs-scan            1.00     20.7±0.64ms        ? ?/sec    1.00     20.8±0.64ms        ? ?/sec
rolldown benchmark/threejs-sourcemap       1.00     40.3±0.56ms        ? ?/sec    1.03     41.5±0.95ms        ? ?/sec
rolldown benchmark/threejs10x-bundle       1.00    314.0±2.72ms        ? ?/sec    1.00    315.3±3.34ms        ? ?/sec
rolldown benchmark/threejs10x-scan         1.00    205.0±1.16ms        ? ?/sec    1.00    205.2±4.37ms        ? ?/sec
rolldown benchmark/threejs10x-sourcemap    1.00    427.7±8.34ms        ? ?/sec    1.00    426.6±9.67ms        ? ?/sec

Benchmarks Rust

group                                      pr                                     target
-----                                      --                                     ------
rolldown benchmark/threejs-bundle          1.03     30.3±0.48ms        ? ?/sec    1.00     29.3±0.33ms        ? ?/sec
rolldown benchmark/threejs-scan            1.01     21.6±1.04ms        ? ?/sec    1.00     21.5±0.75ms        ? ?/sec
rolldown benchmark/threejs-sourcemap       1.01     42.5±2.75ms        ? ?/sec    1.00     42.2±1.04ms        ? ?/sec
rolldown benchmark/threejs10x-bundle       1.02    316.9±3.23ms        ? ?/sec    1.00    310.8±3.61ms        ? ?/sec
rolldown benchmark/threejs10x-scan         1.01    207.2±6.00ms        ? ?/sec    1.00    205.9±4.02ms        ? ?/sec
rolldown benchmark/threejs10x-sourcemap    1.01    428.3±9.07ms        ? ?/sec    1.00    425.5±7.29ms        ? ?/sec

Benchmarks Rust

group                                      pr                                     target
-----                                      --                                     ------
rolldown benchmark/threejs-bundle          1.04     30.9±3.62ms        ? ?/sec    1.00     29.7±0.58ms        ? ?/sec
rolldown benchmark/threejs-scan            1.01     21.2±0.74ms        ? ?/sec    1.00     21.1±0.63ms        ? ?/sec
rolldown benchmark/threejs-sourcemap       1.01     41.6±0.40ms        ? ?/sec    1.00     41.2±0.38ms        ? ?/sec
rolldown benchmark/threejs10x-bundle       1.00    316.0±5.53ms        ? ?/sec    1.00    316.4±6.07ms        ? ?/sec
rolldown benchmark/threejs10x-scan         1.01    209.4±4.49ms        ? ?/sec    1.00    207.7±3.27ms        ? ?/sec
rolldown benchmark/threejs10x-sourcemap    1.00    431.0±8.82ms        ? ?/sec    1.00    429.0±6.91ms        ? ?/sec

@underfin
Copy link
Copy Markdown
Contributor Author

underfin commented Apr 29, 2024

Here i revert the index_sorted_cross_chunk_imports back, but the order is not correct, it seems to be the execute order of chunk first module .

@underfin
Copy link
Copy Markdown
Contributor Author

underfin commented Apr 30, 2024

I revert it back, but the code need to rewrite with stable order.
Look like change FxHashSet to IndexSet at type ChunkMetaImports = IndexVec<ChunkId, FxHashSet<SymbolRef>>; type IndexCrossChunkImports = IndexVec<ChunkId, FxHashSet<ChunkId>>; is expected.
The imports_from_other_chunks_vec is also need to using IndexMap instead of HashMap

@hyf0
Copy link
Copy Markdown
Member

hyf0 commented Apr 30, 2024

I revert it back, but the code need to rewrite with stable order.

No need unless we relies on this kind of order and we don't.

Relying on execution order will also make hash changed frequently than using order from sorting module resourcesId.

@hyf0 hyf0 added this pull request to the merge queue Apr 30, 2024
@underfin
Copy link
Copy Markdown
Contributor Author

I revert it back, but the code need to rewrite with stable order.

No need unless we relies on this kind of order and we don't.

Relying on execution order will also make hash changed frequently than using order from sorting module resourcesId.

It will cause the chunk order is not correct. let me give a example for you later.

Merged via the queue into main with commit 16e6ea1 Apr 30, 2024
@hyf0 hyf0 deleted the add-chunk-dynamic-imports branch April 30, 2024 07:47
@hyf0
Copy link
Copy Markdown
Member

hyf0 commented Apr 30, 2024

I revert it back, but the code need to rewrite with stable order.

No need unless we relies on this kind of order and we don't.
Relying on execution order will also make hash changed frequently than using order from sorting module resourcesId.

It will cause the chunk order is not correct. let me give a example for you later.

It's known by me and that's why #122 remains open. I'm still solving it with considering the stability of hash and correctness of execution order rather than only one aspect. Leave it to me.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants