-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Blazor unbelievably slow to build and reconnect #15264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, thanks for the response. Will run dotnet build /bl and get back to you. Add Ignore Linker code to project file meant
|
This is only applicable to blazor wasm. |
ok thanks, was suggested on Gitter channel |
Hopefully what was needed? |
@redowl3 Not quite. You need to run Also, just to clarify, does it take a long time to build the app or are you trying to change/update the app while it is running? |
Renamed to allow it to upload. Yes, trying to change/update the app while running. I've tried it using the default server side project and it takes a couple of seconds, trying it with a reasonable sized solution seems to be the issue. Thanks |
@redowl3 That can definitely be causing issues. From what I see on the binlog the build (which seems to be a clean build) takes about 18 seconds. If you add to that a few additional seconds that it takes for the app to be torn down and the new app to launch, I think you get your 30 seconds. My belief is that something might be breaking your incremental compilation. I tried to repro this creating a huge amount of components on a new app (like 40 or so) and it doesn't repro for me. I would look at other processes that might be running at the same time and slowing down your build. I'm doing this from a laptop. I'm closing this issue as this doesn't seem to be an issue in the general case, but an issue with your environment. |
Do you have any more information on breaking your incremental compilation? Also did you add a project references to the project? And last question, any idea why the process is getting kicked off on Save when nothing has changed? |
@redowl3 You can capture the builds as visual studio makes them following the steps in https://github.com/dotnet/project-system/blob/master/docs/design-time-builds.md#visual-studio-2017-or-later Then you can use the timeline view on MSBuild structured log viewer to see where the time is being spent on the build. |
@redowl3 these might not amount to much, but perhaps a couple of things you could do here: a) The b) This is a shot in the dark, but in an earlier preview release the compiler had an issue with analyzers. It looks like you are using an SDK \ compiler that should have addressed the issue, but perhaps you could give the workaround a try: In your project file, add the following: <PropertyGroup>
<DisableImplicitAspNetCoreAnalyzers>true</DisableImplicitAspNetCoreAnalyzers>
</PropertyGroup> c) Could you try doing two consecutive rebuilds of your Web project? Command line should be fine to start with. |
Hi, thanks for further information - I can't see where Microsoft.AspNetCore.Blazor is being directly referenced? |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
When building a Blazor Server Side project of any significant size the time it takes to make a change to a .razor component is unbelievably slow.
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I've seen 4 seconds quoted as reasonable time for change to take effect
Actual behavior
It can take up to 30 seconds for project to rebuild and be able to resume
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
My machine is running an Intel Core i7 processor
Include the output of
dotnet --info
Microsoft.NETCore.App 3.0.0-rc1-19456-20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0-rc1-19456-20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
The text was updated successfully, but these errors were encountered: