Skip to content

NET10 Blazor Server Hot Reload is still very slow and here are the numbers to prove it #62740

@willdean

Description

@willdean

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

dotnet watch in SDKs from 9.0 onwards is much slower with Blazor Server apps than NET8 SDK was. This has improved very slightly between 9 and 10p6, but is still much worse than it used to be. Updates often take several seconds from editing a file to a component/page re-rendering.

To avoid subjective discussions about performance I built an application to measure this which, though artificial, gets results that match my real-world experience: (Blue is 8, Green/Red are 9/10p6)

Image

The app itself is NET8, and the only change between the tests is the global.json to select the SDK.

I know this issue probably belongs in the SDK repo, but I have put it here, because I think bad hot reload represents an existential risk to Blazor and I am a big fan of Blazor and want it to succeed. I think it's reasonable to draw attention to big performance regressions, particularly ones which impact dev experience so badly.

Expected Behavior

Blazor Server hot-reload performance in 10.0 should be approximately the same as in 8.0 (or better, I suppose!)

Steps To Reproduce

https://github.com/willdean/blazor-hot-reload-10p6

This is two apps - a webapp which measures how much delay there was between source file writing and update and an updater app which modifies a razor component every 2 seconds.

Results are written to a log file in the temp directory.

Exceptions (if any)

No response

.NET Version

10.0.100-preview.6.25358.103

Anything else?

.NET SDK:
Version: 10.0.100-preview.6.25358.103
Commit: 75972a5ba7
Workload version: 10.0.100-manifests.6616851e
MSBuild version: 17.15.0-preview-25358-103+75972a5ba

Runtime Environment:
OS Name: Windows
OS Version: 10.0.26100
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\10.0.100-preview.6.25358.103\

.NET workloads installed:
[maui-windows]
Installation Source: VS 17.14.36310.24, VS 17.14.36202.13
Manifest Version: 10.0.0-preview.5.25306.5/10.0.100-preview.5
Manifest Path: C:\Program Files\dotnet\sdk-manifests\10.0.100-preview.5\microsoft.net.sdk.maui\10.0.0-preview.5.25306.5\WorkloadManifest.json
Install Type: Msi

[aspire]
Installation Source: VS 17.14.36310.24, VS 17.14.36202.13
Manifest Version: 8.2.2/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.2.2\WorkloadManifest.json
Install Type: Msi

[maccatalyst]
Installation Source: VS 17.14.36310.24, VS 17.14.36202.13
Manifest Version: 18.4.10622-net10-p5/10.0.100-preview.5
Manifest Path: C:\Program Files\dotnet\sdk-manifests\10.0.100-preview.5\microsoft.net.sdk.maccatalyst\18.4.10622-net10-p5\WorkloadManifest.json
Install Type: Msi

[ios]
Installation Source: VS 17.14.36310.24, VS 17.14.36202.13
Manifest Version: 18.4.10622-net10-p5/10.0.100-preview.5
Manifest Path: C:\Program Files\dotnet\sdk-manifests\10.0.100-preview.5\microsoft.net.sdk.ios\18.4.10622-net10-p5\WorkloadManifest.json
Install Type: Msi

[android]
Installation Source: VS 17.14.36310.24, VS 17.14.36202.13
Manifest Version: 36.0.0-preview.5.116/10.0.100-preview.5
Manifest Path: C:\Program Files\dotnet\sdk-manifests\10.0.100-preview.5\microsoft.net.sdk.android\36.0.0-preview.5.116\WorkloadManifest.json
Install Type: Msi

Configured to use workload sets when installing new manifests.
Workloads are configured to install and update using workload versions, but none were found. Run "dotnet workload restore" to install a workload version.

Host:
Version: 10.0.0-preview.6.25358.103
Architecture: x64
Commit: 75972a5ba7

.NET SDKs installed:
8.0.412 [C:\Program Files\dotnet\sdk]
9.0.108 [C:\Program Files\dotnet\sdk]
9.0.300 [C:\Program Files\dotnet\sdk]
9.0.302 [C:\Program Files\dotnet\sdk]
10.0.100-preview.6.25358.103 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.18 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.0-preview.6.25358.103 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.18 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.0-preview.6.25358.103 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.18 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 10.0.0-preview.6.25358.103 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
N:\will\hrtest\global.json

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor Componentsarea-commandlinetoolsIncludes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPIfeature-dotnetwatchThis issue is related to the dotnet-watch command-line tool (now external)

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions