Dart deferred loading meta issue
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- wasm
- Domain
- compilers, performance
Research direction
Start by reading the five associated issues, then review how wasm-opt, wasm-merge, and wasm-split are used for the current multi-module deferred-loading workflow. The work is done when Binaryen has a defined and working way to optimize the split modules collectively without breaking loading or losing the expected code-size improvements.
Written by the indexing model from the issue text.
Description
The Dart team is experimenting with using binaryen tools to support our deferred loading feature for users targeting wasm. We currently have experimental support for the feature by having the compiler emit multiple modules.
Typically, when emitting a single module, we use wasm-opt with the --closed-world flag to optimize the wasm module that dart2wasm is emitting. This works well for us and sometimes produces 3x code size improvements as well as other structural improvements like inlining, devirtualization, DCE, etc.
Now with deferred loading we are now splitting that single module into many modules that collectively represent the same program. So we technically still have a closed world... but split across multiple modules. Ideally we could specify all these modules to wasm-opt and it would perform the same (or close to the same) optimizations collectively across all these modules. Today wasm-opt doesn't support anything like this.
I've tried implementing this using a combination of wasm-merge -> wasm-opt -> wasm-split but ran into several issues where the code didn't load and the code size didn't improve much.
Associated issues:
https://github.com/WebAssembly/binaryen/issues/7725
https://github.com/WebAssembly/binaryen/issues/7724
https://github.com/WebAssembly/binaryen/issues/7723
https://github.com/WebAssembly/binaryen/issues/7722
https://github.com/WebAssembly/binaryen/issues/7721
- Dominant language
- WebAssembly
- Stars
- 8.6k
- Forks
- 885
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 77
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from WebAssembly/binaryen
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
WebAssembly/binaryen#9135 · 1 comment ·
-
Difficulty 2/5 Half a day Newbie friendliness 76/100
WebAssembly/binaryen#9018 · 3 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
WebAssembly/binaryen#9133 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
WebAssembly/binaryen#9123 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
WebAssembly/binaryen#9122 ·
All issues in WebAssembly/binaryen
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
JakeChampion/lang#10213 ·
-
bug language-server
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
purefunctor/purescript-iris#552 ·
-
enhancement good first issue needs testing
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
bradcypert/plum#58 ·