WebAssembly / WebAssembly/binaryen
Investigate why `wasm-merge` + `wasm-opt` output is larger than the corresponding monolithic module processed with `wasm-opt`
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 8.6k
- Forks
- 885
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 69
Description
Recently, we experimented with applying wasm-merge and wasm-split to a Compose Multiplatform application using different Kotlin compilation modes as input. More detailed results are available here.
The results most relevant to this issue are:
Original Opt × Monolith: 6,159,539 bytesMerged Opt × Closed World: 6,589,864 bytes
As shown above, the second binary is larger. It would be useful to investigate the reasons for this difference and suggest possible improvements on both on Binaryen and Kotlin sides.
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.
Research direction
Start by reproducing the reported size comparison with wasm-merge, wasm-split, and wasm-opt using the Compose Multiplatform inputs described in KT-86859. Compare the optimized monolithic and merged binaries to identify the causes of the size difference; done means documenting the causes and proposing improvements for Binaryen or Kotlin.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin, wasm
- Domain
- compilers, performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100