Closed
Description
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: