-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[release/7.0][browser] improve default initial memory size #80849
[release/7.0][browser] improve default initial memory size #80849
Conversation
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsSimplified backport of #80257 to release/7.0 The default value of 512MB for initial memory is too high for mobile devices. Customer ImpactFixes #61925 WorkaroundAdding a property to the customer project file will achieve the same outcome as this PR, for the older releases of Net7. Testing
RiskThe fix for Net8 uses more complex logic and we decided to reduce the risk by making backport logic simpler. This PR makes initial memory for AOT build lower than it was in Net7 so far.
Which could be resolved by adding property into the customer project file. The
|
/azp run runtime-wasm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
was approved by email. |
Approved by Tactics for 7.0.4. |
For older .NET 6, you need to add
Manually? |
In .NET 6 the property name is |
Simplified backport of #80257 to release/7.0
The default value of 512MB for initial memory is too high for mobile devices.
This PR changes the default to 16MB for builds with
wasm-tools
workload and without AOT.This PR changes the default to 128MB for builds with
wasm-tools
workload and with AOT.Customer Impact
Fixes #61925
Fixes #66313
Fixes #79909
Fixes #73949
Workaround
Adding a property to the customer project file will achieve the same outcome as this PR,
<EmccInitialHeapSize>16777216</EmccInitialHeapSize>
<EmccTotalMemory>16777216</EmccTotalMemory>
Testing
Risk
The fix for Net8 uses more complex logic and we decided to reduce the risk by making backport logic simpler.
This PR makes initial memory for AOT build lower than it was in Net7 so far.
It may lead to new compilation error similar to:
Which could be resolved by adding property into the customer project file.
<EmccInitialHeapSize>536870912</EmccInitialHeapSize>
The
EmccInitialHeapSize
value need to be rounded up to 16KB page size.