question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Size regression in Blazor WASM apps

See original GitHub issue

Looking at https://aka.ms/dotnetperfstatus, there is a 140KB size regression in the default Blazor WASM app size between the following commits:

https://github.com/dotnet/runtime/compare/6b8326997...06228c1087

SOD - New Blazor Template - Publish

image

SOD - New Blazor Template - Publish - AOT

image

We should investigate what change caused this size regression and if there is anything that can be done.

From looking at the charts, some of it comes from System.Private.CoreLib:

Before

image

After

image

But the biggest file that added here is System.Linq.Expressions.dll. It isn’t in the Before, but in the After it is over 100KB itself:

After

image

Maybe a new ASP.NET change now brings in Linq.Expressions by default? cc @SteveSandersonMS @captainsafia

cc @lewing @SamMonoRT

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

4reactions
SteveSandersonMScommented, Mar 3, 2022

[Pranav] how does that sound?

Yep, great - thanks. Rolling this change back does feel right. Maybe activation-by-default could come back in the future if the underlying implementation is updated, but it’s not a big loss to tell customers they can do this themselves in user code.

3reactions
SteveSandersonMScommented, Mar 3, 2022

It’s really great that we’re able to detect this kind of thing systematically. Thanks for letting us know, @eerhardt!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ASP.NET Core Blazor performance best practices
Trimming unused assemblies from a Blazor WebAssembly app reduces the app's size by removing unused code in the app's binaries. For more ...
Read more >
Guidance required on Blazor WASM performance issues #3643
If you really care the loading performance, I recommend you use Blazor-Server. Download size is significantly smaller than a Blazor WebAssembly ...
Read more >
.NET 8 Preview 2: QuickGrid, WebAssembly Boost for ...
Blazor QuickGrid is "built to be a simple and convenient way to display your data, while still providing powerful features like sorting, ...
Read more >
Blazor United Prototype (.NET 8) : r/dotnet
Blazor doesn't optimize the download size during development so that your development workflow stays quick and interative. When you publish the ...
Read more >
Building A Production Ready Blazor WASM App - YouTube
You've heard of Blazor WASM and you are excited. But how do we make your application production ready? Steve will talk about writing ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found