[browser][coreCLR] reduce initial memory footprint#127905
[browser][coreCLR] reduce initial memory footprint#127905pavelsavara wants to merge 1 commit intodotnet:mainfrom
Conversation
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
There was a problem hiding this comment.
Pull request overview
This PR reduces the default WebAssembly memory and stack settings used by the CoreCLR browser host, aiming to lower the initial memory footprint during startup (per #127880).
Changes:
- Decrease Emscripten
INITIAL_MEMORYfrom 128 MB to 32 MB forbrowserhost. - Decrease Emscripten
STACK_SIZEfrom 5 MB to 2 MB forbrowserhost. - Keep the MSBuild CoreCLR WASM relink targets in sync with the
browserhostCMake configuration.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/native/corehost/browserhost/CMakeLists.txt | Lowers default INITIAL_MEMORY and STACK_SIZE link options for the browser host to reduce startup footprint. |
| src/mono/browser/build/BrowserWasmApp.CoreCLR.targets | Mirrors the updated memory/stack defaults in the CoreCLR WASM relink pipeline so app relinks match the host configuration. |
radekdoulik
left a comment
There was a problem hiding this comment.
LGTM, let see if CI tests will pass. Thank you!
|
There are more places where this is hardcoded: Is this inconsistency intentional? |
Yes, that is Mono |
|
What's the reasoning behind lower limits for CoreCLR? Is there a problem with applying the same lower limits to Mono as well? |
Fixes #127880