Description
Hi,
I have a project Blazor Server with ~ 180 .razor Files (186 Files, 55 Folder)
If all folder structure is in the same project the hot reload takes ~ 15 seconds , more than build time ( 10 seconds ) .
If we split the .razor files on Libraries , we get the next Results
Main App (Only Host.razor) : (Reference to Shared Library, Front Library,Admin Library )
– Hot Reload for all tests after 1 seconds
Shared Library (21 Files, 1 Folder) : Layout, Shared Components, etc
– Add p: Hot Reload after 2-3 seconds
– Add style to p : Hot Reload after after 2-3 seconds
– Counter Example with ++ : Hot Reload after 1 seconds
Front Library (54 Files, 15 Folders) (Reference to Shared Library)
– Add p: Hot Reload after 20 seconds
– Add style to p : Hot Reload after after 4 seconds
– Counter Example with ++ : Hot Reload after 3 seconds
Admin Library (106 Files, 36 Folders) (Reference to Shared Library)
– Add p: Hot Reload after 12 seconds
– Add style to p : Hot Reload after after 8 seconds
– Counter Example with ++ : Hot Reload after 8 seconds
I am suspecting maybe we have something from old Projects because we have upgraded from 2.2 to 3.1 ( Blazor ) to 5,etc
We have tried to remove html from Some razor Files specially Layout and seems to work quickly if there is just some simple html lines.
How can we improve ? It depends on File nr and complexity ? or depends on references ? How can we structure the project ?
PS: The issue is posted based on disscussion : https://devblogs.microsoft.com/aspnet/asp-net-core-updates-in-net-6-preview-3/comment-page-3/#comment-3245