You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that the publish experience of Blazor WebAssembly is better polished. I'm not familiar with these WebAssembly stuff, but I'm wondering if we can reuse their optimizations or have to roll our own.
Example of steps to reproduce:
Avalonia
dotnet new avalonia.xplat -o Test.Avalonia -f net7.0
cd .\Test.Avalonia\Test.Avalonia.Browser\
dotnet workload restore
dotnet publish -c Release
dotnet serve --directory .\bin\Release\net7.0\browser-wasm\AppBundle\
When accessed twice from Microsoft Edge version 112:
45 requests 14.8 MB transferred 14.8 MB resources
45 requests 0 B transferred 14.8 MB resources
When accessed twice from Firefox version 112:
45 requests 14.78 MB / 14.79 MB transferred
45 requests 14.78 MB / 6.25 MB transferred
Blazor
dotnet new blazorwasm -o Test.Blazor -f net7.0
cd .\Test.Blazor\
dotnet workload restore
dotnet publish -c Release
dotnet serve --directory .\bin\Release\net7.0\publish\wwwroot\
When accessed twice from Microsoft Edge version 112:
42 requests 5.9 MB transferred 5.9 MB resources
10 requests 208 B transferred 513 kB resources
When accessed twice from Firefox version 112:
42 requests 5.91 MB / 5.92 MB transferred
42 requests 5.91 MB / 0 B transferred
The following is a non-exhaustive list of differences.
Blazor automatically generates Brotli/Gzip compressed static files (not used in the repro steps above).
Blazor only fetches static files once on Chromium, so it doesn't rely on the browser's caching behavior and is probably faster.
Avalonia doesn't publish the app into the publish folder, making it difficult to separate the publish artifacts from the build artifacts.
I think it's not the right place for this issue, as dotnet team manages app publishing process.
In general, I need to say that WebAssembly (no-Blazor) app is smaller (assuming it was compressed with the same algorithm, what you still can do automatically on static web servers), and faster.
Not sure if saving binaries in the local storage is faster than browser build-in caching, could be.
It seems that the publish experience of Blazor WebAssembly is better polished. I'm not familiar with these WebAssembly stuff, but I'm wondering if we can reuse their optimizations or have to roll our own.
Example of steps to reproduce:
Avalonia
When accessed twice from Microsoft Edge version 112:
When accessed twice from Firefox version 112:
Blazor
When accessed twice from Microsoft Edge version 112:
When accessed twice from Firefox version 112:
The following is a non-exhaustive list of differences.
publish
artifacts from thebuild
artifacts.You can find more information about Blazor WebAssembly on https://learn.microsoft.com/aspnet/core/blazor/host-and-deploy/webassembly.
The text was updated successfully, but these errors were encountered: