Core Managed libraries size-reduction for WebAssembly #44530
Labels
arch-wasm
WebAssembly architecture
area-Meta
size-reduction
Issues impacting final app size primary for size sensitive workloads
tracking
This issue is tracking the completion of other related issues.
Milestone
Libraries code reduction:
In order to produce a minimally-sized Blazor wasm sample, we will have to also shrink the size of the managed libraries. Current Brotli-compressed sizes indicate that the bulk of our size budget is taken up by four assemblies:
Every other assembly is around 25KB or lower.
Additionally, all the non-Corelib libraries combined are only barely larger than Corelib itself, and there is no way to get around loading Corelib early in startup. Any work to shrink Corelib will help with native size reduction as well, once we are able to fully link out unused P/Invokes. Given that we have a 0.5MB budget for the entire initial wire transfer and the linked Corelib is around 0.4MB, this effort has no chance of succeeding without a dramatically smaller Corelib. Additional efforts may be necessary, so feel free to add issues to the list, but this should be a good start.
It's worth noting that flags to disable features entirely in the interest of size reduction are very welcome here. The goal is to get the initial wire size as small as possible, and that can mean sacrifices in functionality.
Some of the source generator work is more speculative on the overall size, but it should enable us to trim more code out from Corelib. If we can delay loading of the generated assemblies, it could be a large win.
.NET 6.0.0 :
Vector128<T>
Vector128<T> is unnecessarily being left in a Blazor WASM default app #47860Future release :
The text was updated successfully, but these errors were encountered: