Skip to content

Investigate Blazor WebAssembly startup performance characteristics #54353

Closed
@MackinnonBuck

Description

@MackinnonBuck

Even when Blazor WebAssembly assets are cached, the time it takes for a Blazor WebAssembly app to initialize can be significant. We should investigate ways to further optimize Blazor WebAssembly initialization to reduce this startup time.

Some preliminary investigation suggests that Blazor-specific startup (everything that happens after the code in Program.cs starts executing) accounts for at least half the total initialization time.

We should:

  • Add instrumentation to measure how long various initialization stages take
    • Such stages include loading cached assets, initializing the .NET WebAssembly runtime, and many of the steps between the start of the app's entrypoint and the first interactive render
  • Collect traces for Blazor-specific initialization code
  • Given those results, determine what work can be done to minimize WebAssembly startup time
  • Consider benchmarking daily builds so we can track these detailed performance measurements over time

Related issues:

Metadata

Metadata

Assignees

Labels

Perfarea-blazorIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions