User Story: WebAssembly developers want smaller published output to speed up their apps load time
In the .NET 5 release, we established a baseline of 2.2 MB for the fully compressed output of the default Blazor template running with .NET Core setup. For .NET 6 version, we are aiming to reduce that size by at least 20% for the same template to address size regression compare to .NET Core 3.x where the default template size was 1.7 MB. This is an ambitious goal, and will likely require numerous aggressive approaches to achieve it, including the removal of numerous non-essential features.
The only concern here is the wire size with full compression (at the moment, Brotli). The size or the required computation on either end is unimportant.
There is a dashboard available for historical size tracking at https://aka.ms/dotnetperfstatus. The case we care about is file type .br, .NET 6. Of particular note is the currently largest files: dotnet.wasm at 0.9 MB, System.Private.CoreLib.dll at 0.4 MB, and icudt.dat at 0.3 MB. No other file is above 0.1 MB, but combined they are around 0.6 MB.
Work Items
- [x] MonoVM runtime size-reduction tracking #43778
- [x] Core Managed libraries size-reduction #44530
- [x] Blazor specific libraries work
- [x] Enable trimming of all Blazor libraries https://github.com/dotnet/aspnetcore/issues/30286
- [ ] ~Add option to disable logging in sample Blazor app https://github.com/dotnet/aspnetcore/issues/27721~
- [x] Excessive managed libraries dependencies https://github.com/dotnet/aspnetcore/issues/30098
- [x] Always run native linker for release/publish outputs https://github.com/dotnet/runtime/issues/43783
- [x] Add size tracking for WebAssembly functional tests
- [x] Include more Blazor apps in the size tracking dashboard
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
Tagging subscribers to this area: @CoffeeFlux See info in area-owners.md if you want to be subscribed.
Hi @marek-safar - The link https://aka.ms/dotnetperfstatus is not working :-(
It does for me but it probably requires different permissions (we'll need to check)
@SambhavSacheti does this link work for you - https://aka.ms/blazorwasmsize ?
Nothing left is targeting 6.0