Related:
- hot reload takes too much time · Issue #47179 · dotnet/sdk
- dotnet 9, "dotnet watch" is really bad in Blazor Server · Issue #45810 · dotnet/sdk
- Hot reload extra slow for changes in Rider due to backup files with ~ suffix · Issue #47912 · dotnet/sdk
dotnet watchis slower on net9 than net8, in particular the first change can take 10-20 seconds vs a few seconds for a trivial change to.razorfiles in our large Blazor Server app. (1)- Blazor seems to do a page reload after hot reload in our app, but have not yet been able to create a repro of this behavior in these sample apps. See details below.
(1)
In 9.0.2 SDK release, the hot reload was 10-20x slower for every change, but in 9.0.3 SDK release only the first hot reload is 10-20x slow and subsequent changes are fast.
9.0.104, 9.0.202 and 9.0.300-preview.0.25174.3 all exhibit the slow first hot reload, and in our app, also a special page reload.
In our app, these versions also do a special page reload upon hot reload. Details below.
Run both projects in two separate shells:
dotnet watch --verbose --project Blazor8dotnet watch --verbose --project Blazor9- Wait for browser to launch for each project.
- Edit
Components/Pages/Home.razorin either project, and change the title text or something trivial.
- Simulating a slow
OnInitializedAsyncwith Task.Delay, delays the hot reload on both (probably by design)
- On net9, hot reload incurs what seems like a special page reload. The circuit stays connected and no new HTTP GET request to Blazor, but the page is pre-rendered again, and all scoped services are recreated and re-initialized.
- This page load is slow in our app and delays hot reload, and this did not happen in net8 SDK.

