Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wasm] Experiment with emscripten settings to shrink binary size #43694

Closed
5 tasks
CoffeeFlux opened this issue Oct 21, 2020 · 2 comments
Closed
5 tasks

[wasm] Experiment with emscripten settings to shrink binary size #43694

CoffeeFlux opened this issue Oct 21, 2020 · 2 comments
Assignees
Labels
arch-wasm WebAssembly architecture area-Build-mono size-reduction Issues impacting final app size primary for size sensitive workloads
Milestone

Comments

@CoffeeFlux
Copy link
Contributor

CoffeeFlux commented Oct 21, 2020

The emscripten settings file defines a lot of different settings we could possibly set to get size wins without too much effort, but it's hard to ballpark how much of a difference these will make.

Some options that appear initially promising:

  • dlmalloc - we could switch to a more compact implementation, or just remove this entirely from mono-codeman.c
  • EVAL_CTORS - this tries to evaluate global ctors at compile-time, and might potentially give us size wins on the ICU builds?
  • INCOMING_MODULE_JS_API - we probably don't need most of these?
  • WebGL - there are a lot of random WebGL settings that might be keeping things around?
  • ASSERTIONS - this adds runtime assertions that we may not need but bloat the code size
@CoffeeFlux CoffeeFlux added arch-wasm WebAssembly architecture area-Build-mono labels Oct 21, 2020
@CoffeeFlux CoffeeFlux added this to the 6.0.0 milestone Oct 21, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Oct 21, 2020
@CoffeeFlux CoffeeFlux removed the untriaged New issue has not been triaged by the area owner label Oct 21, 2020
@marek-safar marek-safar added the size-reduction Issues impacting final app size primary for size sensitive workloads label Dec 17, 2020
@CoffeeFlux CoffeeFlux self-assigned this Jan 8, 2021
@CoffeeFlux CoffeeFlux removed their assignment Feb 2, 2021
@CoffeeFlux
Copy link
Contributor Author

Some experiments done, but the results are not very promising.

@lewing
Copy link
Member

lewing commented Jul 31, 2021

closing this

@lewing lewing closed this as completed Jul 31, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Aug 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Build-mono size-reduction Issues impacting final app size primary for size sensitive workloads
Projects
None yet
Development

No branches or pull requests

4 participants