Aspnetcore: Razor Tooling: VS is very slow when changes are made to .razor-based components

Created on 27 May 2020  Â·  25Comments  Â·  Source: dotnet/aspnetcore

Describe the bug

Whenever I make type-structure-related changes to Blazor components inside .razor files VS becomes very unresponsive, CPU usage goes up and this continues for ~30 seconds.

The changes that trigger this behavior are the following:

  • Adding a new property with [Parameter] attribute to the @code {} section inside of *.razor file.
  • Changing the name or return type of such a property
  • Adding a new *.razor file
  • Renaming or moving *.razor file from one folder to another
  • Editing any of the _Imports.razor files in any way

So, presumably, every time I make a change that affects the components behavior (like which parameters are available, which components are in scope, etc.) VS must be doing a heavy rebuild of everything related to this change and that causes it to be very unresponsive.

Further technical details

  • ASP.NET Core version: 5.0.0-preview.4.20257.10
  • Include the output of dotnet --info:
.NET SDK (reflecting any global.json):                                                                                
 Version:   5.0.100-preview.4.20258.7                                                                                 
 Commit:    65f0fc2cad                                                                                                

Runtime Environment:                                                                                                  
 OS Name:     Windows                                                                                                 
 OS Version:  10.0.17134                                                                                              
 OS Platform: Windows                                                                                                 
 RID:         win10-x64                                                                                               
 Base Path:   C:\Program Files\dotnet\sdk\5.0.100-preview.4.20258.7\                                                  

Host (useful for support):                                                                                            
  Version: 5.0.0-preview.4.20251.6                                                                                    
  Commit:  47ec733ba7                                                                                                 

.NET SDKs installed:                                                                                                  
  3.1.300-preview-015135 [C:\Program Files\dotnet\sdk]                                                                
  5.0.100-preview.4.20258.7 [C:\Program Files\dotnet\sdk]                                                             

.NET runtimes installed:                                                                                              
  Microsoft.AspNetCore.All 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]                            
  Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]                            
  Microsoft.AspNetCore.All 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]                           
  Microsoft.AspNetCore.All 2.1.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]                           
  Microsoft.AspNetCore.App 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]                            
  Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]                            
  Microsoft.AspNetCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]                           
  Microsoft.AspNetCore.App 2.1.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]                           
  Microsoft.AspNetCore.App 3.0.0-preview7.19365.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]           
  Microsoft.AspNetCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]                            
  Microsoft.AspNetCore.App 5.0.0-preview.4.20257.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]         
  Microsoft.NETCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]                                 
  Microsoft.NETCore.App 2.1.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]                                 
  Microsoft.NETCore.App 3.0.0-preview7-27912-14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]                
  Microsoft.NETCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]                                  
  Microsoft.NETCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]                                  
  Microsoft.NETCore.App 5.0.0-preview.4.20251.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]                
  Microsoft.WindowsDesktop.App 3.0.0-preview7-27912-14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]  
  Microsoft.WindowsDesktop.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]                    
  Microsoft.WindowsDesktop.App 5.0.0-preview.4.20251.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]  
  • The IDE (VS / VS Code/ VS4Mac) you're running on, and it's version: latest preview - VS 2019 16.7 Preview 1
Done Perf area-razor.tooling investigate

Most helpful comment

It would be nice if someone that was actually in charge of fixing this would give some kind of update. The product is unusable in it's current form. Period. I am waiting 20 seconds between tying characters at this point. This is not a performance issue - it is a bug. Have started recommending we abandon this Blazor / .Net core stuff since it is clearly not ready for production if we can't even get working tools. 30 days open and no updates is just crazy.

Is ANYONE able to actually do editing in any version of VS2019 with blazor/razor pages?

All 25 comments

UPDATE:

Slowdowns seem to be particularly severe and long lasting when editing anything inside the @code {...} section in .razor files, including when editing XML Doc comments for parameter properties.

Below are the 2 sample code stacks I managed to take during VS freezes (both on the main UI thread):

0, ntoskrnl.exe!KeWaitForSingleObject+0x30c1
1, ntoskrnl.exe!KeWaitForSingleObject+0x1521
2, ntoskrnl.exe!KeWaitForSingleObject+0xadb
3, ntoskrnl.exe!KeWaitForSingleObject+0x1ff
4, ntoskrnl.exe!ExWaitForRundownProtectionRelease+0x9fa
5, ntoskrnl.exe!KeWaitForSingleObject+0x31cb
6, ntoskrnl.exe!KeSynchronizeExecution+0x2e02
7, Microsoft.AspNetCore.Razor.Language.Legacy.Tokenizer.get_CurrentCharacter() + 0xe <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x21dd72
8, 0x33099061008fd0d0
9, 0x8fd104f5420db0
10, Microsoft.AspNetCore.Razor.Language.Legacy.HtmlTokenizer.Text() + 0x96 <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x248d42
11, Microsoft.AspNetCore.Razor.Language.Legacy.Tokenizer.get_CurrentCharacter() + 0xe <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x21dd72 (No unwind info)
12, Microsoft.AspNetCore.Razor.Language.Legacy.HtmlTokenizer.AtToken() + 0x71 <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x249061 (No unwind info)
13, Microsoft.AspNetCore.Razor.Language.Legacy.HtmlTokenizer.Text() + 0x96 <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x248d42 (No unwind info)
14, Microsoft.AspNetCore.Razor.Language.Legacy.HtmlTokenizer.Dispatch() + 0x63 <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x24887b (No unwind info)
15, Microsoft.AspNetCore.Razor.Language.Legacy.Tokenizer.Turn() + 0x2f <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x21dea3 (No unwind info)
16, Microsoft.AspNetCore.Razor.Language.Legacy.Tokenizer.NextToken() + 0x6c <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x21de6c (No unwind info)
17, Microsoft.AspNetCore.Razor.Language.Legacy.TokenizerView`1[[System.__Canon, mscorlib]].Next() + 0x12 <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x2173ae (No unwind info)
18, Microsoft.AspNetCore.Razor.Language.Legacy.TokenizerBackedParser`1[[System.__Canon, mscorlib]].NextToken() + 0x1f <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x215b07 (No unwind info)
19, System.Collections.Generic.List`1[[System.__Canon, mscorlib]]..ctor(System.Collections.Generic.IEnumerable`1<System.__Canon>) + 0xf7 <-- mscorlib.ni.dll+0x3e9a57 (No unwind info)
20, System.Linq.Enumerable.ToList[[System.__Canon, mscorlib]](System.Collections.Generic.IEnumerable`1<System.__Canon>) + 0x3e <-- System.Core.ni.dll+0x1ec5ce (No unwind info)
21, Microsoft.AspNetCore.Razor.Language.Legacy.HtmlMarkupParser.GetParserState(ParseMode) + 0x40 <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x2128e0 (No unwind info)
22, Microsoft.AspNetCore.Razor.Language.Legacy.HtmlMarkupParser.ParseMarkupNode(Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax.SyntaxListBuilder`1<Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax.RazorSyntaxNode> ByRef, ParseMode) + 0x1d <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x20dc95 (No unwind info)
23, Microsoft.AspNetCore.Razor.Language.Legacy.HtmlMarkupParser.ParseMarkupNodes(Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax.SyntaxListBuilder`1<Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax.RazorSyntaxNode> ByRef, ParseMode, System.Func`2<Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax.SyntaxToken,Boolean>) + 0x8e <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x20dc52 (No unwind info)
24, Microsoft.AspNetCore.Razor.Language.Legacy.HtmlMarkupParser.ParseDocument() + 0x8a <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x20d2ee (No unwind info)
25, Microsoft.AspNetCore.Razor.Language.Legacy.RazorParser.Parse(Microsoft.AspNetCore.Razor.Language.RazorSourceDocument) + 0x94 <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x204014 (No unwind info)
26, Microsoft.AspNetCore.Razor.Language.RazorSyntaxTree.Parse(Microsoft.AspNetCore.Razor.Language.RazorSourceDocument, Microsoft.AspNetCore.Razor.Language.RazorParserOptions) + 0x41 <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x203c79 (No unwind info)
27, Microsoft.AspNetCore.Razor.Language.DefaultRazorParsingPhase.ExecuteCore(Microsoft.AspNetCore.Razor.Language.RazorCodeDocument) + 0x38 <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x203af8 (No unwind info)
28, Microsoft.AspNetCore.Razor.Language.RazorEnginePhaseBase.Execute(Microsoft.AspNetCore.Razor.Language.RazorCodeDocument) + 0x1f <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x1f79bf (No unwind info)
29, Microsoft.AspNetCore.Razor.Language.DefaultRazorEngine.Process(Microsoft.AspNetCore.Razor.Language.RazorCodeDocument) + 0x48 <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x1f8e94 (No unwind info)
30, Microsoft.AspNetCore.Razor.Language.DefaultRazorProjectEngine.ProcessCore(Microsoft.AspNetCore.Razor.Language.RazorCodeDocument) + 0x23 <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x224103 (No unwind info)
31, Microsoft.AspNetCore.Razor.Language.DefaultRazorProjectEngine.ProcessDesignTime(Microsoft.AspNetCore.Razor.Language.RazorSourceDocument, System.String, System.Collections.Generic.IReadOnlyList`1<Microsoft.AspNetCore.Razor.Language.RazorSourceDocument>, System.Collections.Generic.IReadOnlyList`1<Microsoft.AspNetCore.Razor.Language.TagHelperDescriptor>) + 0x31 <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x2240d5 (No unwind info)
32, Microsoft.CodeAnalysis.Razor.ProjectSystem.DocumentState+ComputedStateTracker+<GetGeneratedOutputAndVersionCoreAsync>d__7.MoveNext() + 0xb7b <-- Microsoft.CodeAnalysis.Razor.Workspaces.ni.dll+0x96687 (No unwind info)
33, System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.ValueTuple`4[[System.__Canon, mscorlib],[Microsoft.CodeAnalysis.VersionStamp, Microsoft.CodeAnalysis.Workspaces],[Microsoft.CodeAnalysis.VersionStamp, Microsoft.CodeAnalysis.Workspaces],[Microsoft.CodeAnalysis.VersionStamp, Microsoft.CodeAnalysis.Workspaces]], mscorlib]].Start[[Microsoft.CodeAnalysis.Razor.ProjectSystem.DocumentState+ComputedStateTracker+<GetGeneratedOutputAndVersionCoreAsync>d__7, Microsoft.CodeAnalysis.Razor.Workspaces]](<GetGeneratedOutputAndVersionCoreAsync>d__7 ByRef) + 0x40 <-- Microsoft.CodeAnalysis.Razor.Workspaces.ni.dll+0x7f6c4 (No unwind info)
34, Microsoft.CodeAnalysis.Razor.ProjectSystem.DocumentState+ComputedStateTracker.GetGeneratedOutputAndVersionCoreAsync(Microsoft.CodeAnalysis.Razor.ProjectSystem.DefaultProjectSnapshot, Microsoft.CodeAnalysis.Razor.ProjectSystem.DocumentSnapshot) + 0x86 <-- Microsoft.CodeAnalysis.Razor.Workspaces.ni.dll+0x7f0ea (No unwind info)
35, Microsoft.CodeAnalysis.Razor.ProjectSystem.DocumentState+ComputedStateTracker.GetGeneratedOutputAndVersionAsync(Microsoft.CodeAnalysis.Razor.ProjectSystem.DefaultProjectSnapshot, Microsoft.CodeAnalysis.Razor.ProjectSystem.DocumentSnapshot) + 0x8e <-- Microsoft.CodeAnalysis.Razor.Workspaces.ni.dll+0x7effe (No unwind info)
36, Microsoft.CodeAnalysis.Razor.ProjectSystem.DefaultDocumentSnapshot+<GetGeneratedOutputAsync>d__20.MoveNext() + 0x47 <-- Microsoft.CodeAnalysis.Razor.Workspaces.ni.dll+0x93bcb (No unwind info)
37, System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib]].Start[[Microsoft.CodeAnalysis.Razor.ProjectSystem.DefaultDocumentSnapshot+<GetGeneratedOutputAsync>d__20, Microsoft.CodeAnalysis.Razor.Workspaces]](<GetGeneratedOutputAsync>d__20 ByRef) + 0x40 <-- Microsoft.CodeAnalysis.Razor.Workspaces.ni.dll+0x7ac94 (No unwind info)
38, Microsoft.CodeAnalysis.Razor.ProjectSystem.DefaultDocumentSnapshot.GetGeneratedOutputAsync() + 0x59 <-- Microsoft.CodeAnalysis.Razor.Workspaces.ni.dll+0x7dd15 (No unwind info)
39, Microsoft.CodeAnalysis.Razor.ProjectSystem.GeneratedDocumentTextLoader+<LoadTextAndVersionAsync>d__4.MoveNext() + 0x39 <-- Microsoft.CodeAnalysis.Razor.Workspaces.ni.dll+0x9495d (No unwind info)
40, System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib]].Start[[Microsoft.CodeAnalysis.Razor.ProjectSystem.GeneratedDocumentTextLoader+<LoadTextAndVersionAsync>d__4, Microsoft.CodeAnalysis.Razor.Workspaces]](<LoadTextAndVersionAsync>d__4 ByRef) + 0x40 <-- Microsoft.CodeAnalysis.Razor.Workspaces.ni.dll+0x7ab38 (No unwind info)
41, Microsoft.CodeAnalysis.Razor.ProjectSystem.GeneratedDocumentTextLoader.LoadTextAndVersionAsync(Microsoft.CodeAnalysis.Workspace, Microsoft.CodeAnalysis.DocumentId, System.Threading.CancellationToken) + 0x59 <-- Microsoft.CodeAnalysis.Razor.Workspaces.ni.dll+0x844e5 (No unwind info)
42, Microsoft.CodeAnalysis.TextLoader+<LoadTextAsync>d__7.MoveNext() + 0x61 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x41c381 (No unwind info)
43, Microsoft.CodeAnalysis.TextLoader.LoadTextAsync(Microsoft.CodeAnalysis.Workspace, Microsoft.CodeAnalysis.DocumentId, System.Threading.CancellationToken) + 0x70 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x3f20b0 (No unwind info)
44, Microsoft.CodeAnalysis.TextDocumentState+<>c__DisplayClass25_0.<CreateRecoverableText>b__0(System.Threading.CancellationToken) + 0x21 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x409ce1 (No unwind info)
45, Roslyn.Utilities.AsyncLazy`1[[System.__Canon, mscorlib]].GetValueAsync(System.Threading.CancellationToken) + 0x1d9 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x3edb79 (No unwind info)
46, Microsoft.CodeAnalysis.RecoverableTextAndVersion+<GetValueAsync>d__15.MoveNext() + 0x2a2 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x41c9d2 (No unwind info)
47, Microsoft.CodeAnalysis.RecoverableTextAndVersion.GetValueAsync(System.Threading.CancellationToken) + 0x67 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x409ca7 (No unwind info)
48, Microsoft.CodeAnalysis.DocumentState+<FullyParseTreeAsync>d__20.MoveNext() + 0x12b <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x436e8b (No unwind info)
49, Microsoft.CodeAnalysis.DocumentState.FullyParseTreeAsync(Roslyn.Utilities.ValueSource`1<Microsoft.CodeAnalysis.TextAndVersion>, Microsoft.CodeAnalysis.ProjectId, System.String, Microsoft.CodeAnalysis.ParseOptions, Roslyn.Utilities.ValueSource`1<Microsoft.CodeAnalysis.AnalyzerConfigSet>, Microsoft.CodeAnalysis.Host.HostLanguageServices, Microsoft.CodeAnalysis.PreservationMode, System.Threading.CancellationToken) + 0x88 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x403da8 (No unwind info)
50, Microsoft.CodeAnalysis.DocumentState+<>c__DisplayClass19_0.<CreateLazyFullyParsedTree>b__0(System.Threading.CancellationToken) + 0x27 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x409f97 (No unwind info)
51, Roslyn.Utilities.AsyncLazy`1[[System.__Canon, mscorlib]].StartAsynchronousComputation(AsynchronousComputationToStart<System.__Canon>, Request<System.__Canon>, System.Threading.CancellationToken) + 0x69 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x3edc39 (No unwind info)
52, Roslyn.Utilities.AsyncLazy`1[[System.__Canon, mscorlib]].GetValueAsync(System.Threading.CancellationToken) + 0x1d9 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x3edb79 (No unwind info)
53, Microsoft.CodeAnalysis.DocumentState+<GetSyntaxTreeAsync>d__50.MoveNext() + 0x42 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x436c32 (No unwind info)
54, Microsoft.CodeAnalysis.DocumentState.GetSyntaxTreeAsync(System.Threading.CancellationToken) + 0x78 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x404428 (No unwind info)
55, Microsoft.CodeAnalysis.SolutionState+CompilationAndGeneratorDriverTranslationAction+AddDocumentsAction+<TransformCompilationAsync>d__2.MoveNext() + 0xe1 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x4550b9 (No unwind info)
56, Microsoft.CodeAnalysis.SolutionState+CompilationAndGeneratorDriverTranslationAction+AddDocumentsAction.TransformCompilationAsync(Microsoft.CodeAnalysis.Compilation, System.Threading.CancellationToken) + 0x6a <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x40a062 (No unwind info)
57, Microsoft.CodeAnalysis.SolutionState+CompilationTracker+<BuildDeclarationCompilationFromInProgressAsync>d__28.MoveNext() + 0xae <-- 0x284c2eee (No unwind info)
58, Microsoft.CodeAnalysis.SolutionState+CompilationTracker.BuildDeclarationCompilationFromInProgressAsync(Microsoft.CodeAnalysis.SolutionServices, InProgressState, Microsoft.CodeAnalysis.Compilation, System.Threading.CancellationToken) + 0x76 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x3ecd86 (No unwind info)
59, Microsoft.CodeAnalysis.SolutionState+CompilationTracker.BuildFinalStateFromInProgressStateAsync(Microsoft.CodeAnalysis.SolutionState, InProgressState, Microsoft.CodeAnalysis.Compilation, System.Threading.CancellationToken) + 0x71 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x3eccf1 (No unwind info)
60, Microsoft.CodeAnalysis.SolutionState+CompilationTracker.BuildCompilationInfoAsync(Microsoft.CodeAnalysis.SolutionState, System.Threading.CancellationToken) + 0x154 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x3ecac4 (No unwind info)
61, Microsoft.CodeAnalysis.SolutionState+CompilationTracker+<GetOrBuildCompilationInfoAsync>d__22.MoveNext() + 0x3d9 <-- 0x36324519 (No unwind info)
62, Microsoft.CodeAnalysis.DocumentState.BindSyntaxTreeToId(Microsoft.CodeAnalysis.SyntaxTree, Microsoft.CodeAnalysis.DocumentId) + 0xb1 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x436af1 (No unwind info)
0, ntoskrnl.exe!KeWaitForSingleObject+0x30c1
1, ntoskrnl.exe!KeWaitForSingleObject+0x1521
2, ntoskrnl.exe!KeWaitForSingleObject+0xadb
3, ntoskrnl.exe!KeWaitForSingleObject+0x1ff
4, ntoskrnl.exe!ExWaitForRundownProtectionRelease+0x9fa
5, ntoskrnl.exe!KeWaitForSingleObject+0x31cb
6, ntoskrnl.exe!KeSynchronizeExecution+0x2e02
7, clr.dll!CorExeMain+0x19262
8, 0x56ca34c0008fcef8
9, 0x6b541ec000000040
10, 0x8fce30008fcfa8
11, 0x56ca35c06b54bc52
12, 0x8fcef856ca3600
13, 0x8fcef856ca34c0
14, 0x56ca009856ca0094
15, 0x6b6270e056ca3600
16, 0x6b54bc75008fce4c
17, 0x56ca0000008fcef8
18, 0x8fcef800000027
19, 0x8fcec480808081
20, 0x56ca00006b53e2f4
21, 0x100000025
22, 0x6b53e000008fcef8
23, clr.dll!InstallCustomModule+0x277e0
24, 0x2ff3f386b53e0d0
25, 0x8fcf70008fcf14
26, 0x8fcef800000001
27, clr.dll!InstallCustomModule+0x277e0
28, 0xf83c0fa0f83d51b4
29, 0x5c0a008fceb8
30, 0x6b545c31008fcebc
31, 0x8fcf7000000001
32, 0x8fcf8005c09fa0
33, 0x8fcedc00005086
34, 0x8fcf345ba863af
35, 0x2ff3f386b53dfe2
36, 0x1008fcf70
37, 0x6b53e3b06b53e0d0
38, 0x8fcf14008fcef8
39, igc32.dll!getJITVersion+0x48f42f
40, 0x6bba170003241b50
41, 0x456ca0000
42, 0x6b6271b000000001
43, 0x6b541ec0008fcfa8
44, 0x2ff3f7880808081
45, 0x2ff3f3800000000
46, 0xc49510006b53e0d0
47, 0x6bafb8cd008fd0e0
48, 0x8fcf7800000001
49, 0x8fcfa86b53ef33
50, 0x8fcf706b541ec0
51, 0x1
52, 0x400000002
53, 0x6b541ec0008fcfa8
54, 0xc495100000000000
55, 0x30b719c00000175
56, 0x400000006
57, 0x6b53ef68008fcf88
58, 0x6b541ec000000000
59, 0x6b541d7c008fcfe0
60, 0x8fcfa800000000
61, 0x80101
62, 0x818fcfd400000001
63, 0x9a0e3750
64, 0x6b54000185a5ebd4
65, 0x801097f6
66, 0x119f600000003
67, 0x31f1888801097f6
68, 0x6bba6a7c00000000
69, 0x1
70, 0x6b540f75008fd000
71, 0x80101
72, 0x1
73, 0x6b53de5000000001
74, 0x6b5412ab008fd018
75, clr.dll!NGenCreateNGenWorker+0x1f91e0
76, 0x1
77, 0x6b5413b5008fd038
78, 0x6bba6cf06bba6cf0
79, 0x1c00000000
80, 0x153d4b0008fd090
81, 0x6b5414ba008fd05c
82, clr.dll!CorExeMain+0x19262 (No unwind info)
83, clr.dll!InstallCustomModule+0x35082 (No unwind info)
84, clr.dll!InstallCustomModule+0x350a5 (No unwind info)
85, clr.dll!InstallCustomModule+0x27724 (No unwind info)
86, clr.dll!InstallCustomModule+0x27412 (No unwind info)
87, clr.dll!InstallCustomModule+0x28363 (No unwind info)
88, clr.dll!InstallCustomModule+0x28398 (No unwind info)
89, clr.dll!InstallCustomModule+0x2b1ac (No unwind info)
90, clr.dll!InstallCustomModule+0x2a3a5 (No unwind info)
91, clr.dll!InstallCustomModule+0x2a6db (No unwind info)
92, clr.dll!InstallCustomModule+0x2a7e5 (No unwind info)
93, clr.dll!InstallCustomModule+0x2a8ea (No unwind info)
94, clr.dll!InstallCustomModule+0x2a963 (No unwind info)
95, clr.dll!InstallCustomModule+0x2676c (No unwind info)
96, clr.dll!LogHelp_TerminateOnAssert+0x7cbf (No unwind info)
97, clr.dll!LogHelp_NoGuiOnAssert+0x209c (No unwind info)
98, clr.dll!LogHelp_NoGuiOnAssert+0x2128 (No unwind info)
99, System.Text.StringBuilder.ExpandByABlock(Int32) + 0xa7 <-- mscorlib.ni.dll+0x3f86c7 (No unwind info)
100, System.Text.StringBuilder.Append(Char, Int32) + 0x5e <-- mscorlib.ni.dll+0x3fadfe (No unwind info)
101, System.Text.StringBuilder.Append(Char) + 0x3e <-- mscorlib.ni.dll+0x3c86be (No unwind info)
102, Microsoft.AspNetCore.Razor.Language.Legacy.LineTrackingStringBuffer.AppendCore(Char) + 0x2b <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x21d5cf (No unwind info)
103, Microsoft.AspNetCore.Razor.Language.Legacy.LineTrackingStringBuffer.Append(Char[]) + 0x2c <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x21d4f8 (No unwind info)
104, Microsoft.AspNetCore.Razor.Language.Legacy.LineTrackingStringBuffer..ctor(Char[], System.String) + 0x73 <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x21d373 (No unwind info)
105, Microsoft.AspNetCore.Razor.Language.Legacy.SeekableTextReader..ctor(Char[], System.String) + 0x2c <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x213a88 (No unwind info)
106, Microsoft.AspNetCore.Razor.Language.Legacy.ParserContext..ctor(Microsoft.AspNetCore.Razor.Language.RazorSourceDocument, Microsoft.AspNetCore.Razor.Language.RazorParserOptions) + 0x76 <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x2040b2 (No unwind info)
107, Microsoft.AspNetCore.Razor.Language.Legacy.RazorParser.Parse(Microsoft.AspNetCore.Razor.Language.RazorSourceDocument) + 0x37 <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x203fb7 (No unwind info)
108, Microsoft.AspNetCore.Razor.Language.RazorSyntaxTree.Parse(Microsoft.AspNetCore.Razor.Language.RazorSourceDocument, Microsoft.AspNetCore.Razor.Language.RazorParserOptions) + 0x41 <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x203c79 (No unwind info)
109, Microsoft.AspNetCore.Razor.Language.DefaultRazorParsingPhase.ExecuteCore(Microsoft.AspNetCore.Razor.Language.RazorCodeDocument) + 0x38 <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x203af8 (No unwind info)
110, Microsoft.AspNetCore.Razor.Language.RazorEnginePhaseBase.Execute(Microsoft.AspNetCore.Razor.Language.RazorCodeDocument) + 0x1f <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x1f79bf (No unwind info)
111, Microsoft.AspNetCore.Razor.Language.DefaultRazorEngine.Process(Microsoft.AspNetCore.Razor.Language.RazorCodeDocument) + 0x48 <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x1f8e94 (No unwind info)
112, Microsoft.AspNetCore.Razor.Language.DefaultRazorProjectEngine.ProcessCore(Microsoft.AspNetCore.Razor.Language.RazorCodeDocument) + 0x23 <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x224103 (No unwind info)
113, Microsoft.AspNetCore.Razor.Language.DefaultRazorProjectEngine.ProcessDesignTime(Microsoft.AspNetCore.Razor.Language.RazorSourceDocument, System.String, System.Collections.Generic.IReadOnlyList`1<Microsoft.AspNetCore.Razor.Language.RazorSourceDocument>, System.Collections.Generic.IReadOnlyList`1<Microsoft.AspNetCore.Razor.Language.TagHelperDescriptor>) + 0x31 <-- Microsoft.AspNetCore.Razor.Language.ni.dll+0x2240d5 (No unwind info)
114, Microsoft.CodeAnalysis.Razor.ProjectSystem.DocumentState+ComputedStateTracker+<GetGeneratedOutputAndVersionCoreAsync>d__7.MoveNext() + 0xb7b <-- Microsoft.CodeAnalysis.Razor.Workspaces.ni.dll+0x96687 (No unwind info)
115, System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.ValueTuple`4[[System.__Canon, mscorlib],[Microsoft.CodeAnalysis.VersionStamp, Microsoft.CodeAnalysis.Workspaces],[Microsoft.CodeAnalysis.VersionStamp, Microsoft.CodeAnalysis.Workspaces],[Microsoft.CodeAnalysis.VersionStamp, Microsoft.CodeAnalysis.Workspaces]], mscorlib]].Start[[Microsoft.CodeAnalysis.Razor.ProjectSystem.DocumentState+ComputedStateTracker+<GetGeneratedOutputAndVersionCoreAsync>d__7, Microsoft.CodeAnalysis.Razor.Workspaces]](<GetGeneratedOutputAndVersionCoreAsync>d__7 ByRef) + 0x40 <-- Microsoft.CodeAnalysis.Razor.Workspaces.ni.dll+0x7f6c4 (No unwind info)
116, Microsoft.CodeAnalysis.Razor.ProjectSystem.DocumentState+ComputedStateTracker.GetGeneratedOutputAndVersionCoreAsync(Microsoft.CodeAnalysis.Razor.ProjectSystem.DefaultProjectSnapshot, Microsoft.CodeAnalysis.Razor.ProjectSystem.DocumentSnapshot) + 0x86 <-- Microsoft.CodeAnalysis.Razor.Workspaces.ni.dll+0x7f0ea (No unwind info)
117, Microsoft.CodeAnalysis.Razor.ProjectSystem.DocumentState+ComputedStateTracker.GetGeneratedOutputAndVersionAsync(Microsoft.CodeAnalysis.Razor.ProjectSystem.DefaultProjectSnapshot, Microsoft.CodeAnalysis.Razor.ProjectSystem.DocumentSnapshot) + 0x8e <-- Microsoft.CodeAnalysis.Razor.Workspaces.ni.dll+0x7effe (No unwind info)
118, Microsoft.CodeAnalysis.Razor.ProjectSystem.DefaultDocumentSnapshot+<GetGeneratedOutputAsync>d__20.MoveNext() + 0x47 <-- Microsoft.CodeAnalysis.Razor.Workspaces.ni.dll+0x93bcb (No unwind info)
119, System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib]].Start[[Microsoft.CodeAnalysis.Razor.ProjectSystem.DefaultDocumentSnapshot+<GetGeneratedOutputAsync>d__20, Microsoft.CodeAnalysis.Razor.Workspaces]](<GetGeneratedOutputAsync>d__20 ByRef) + 0x40 <-- Microsoft.CodeAnalysis.Razor.Workspaces.ni.dll+0x7ac94 (No unwind info)
120, Microsoft.CodeAnalysis.Razor.ProjectSystem.DefaultDocumentSnapshot.GetGeneratedOutputAsync() + 0x59 <-- Microsoft.CodeAnalysis.Razor.Workspaces.ni.dll+0x7dd15 (No unwind info)
121, Microsoft.CodeAnalysis.Razor.ProjectSystem.GeneratedDocumentTextLoader+<LoadTextAndVersionAsync>d__4.MoveNext() + 0x39 <-- Microsoft.CodeAnalysis.Razor.Workspaces.ni.dll+0x9495d (No unwind info)
122, System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib]].Start[[Microsoft.CodeAnalysis.Razor.ProjectSystem.GeneratedDocumentTextLoader+<LoadTextAndVersionAsync>d__4, Microsoft.CodeAnalysis.Razor.Workspaces]](<LoadTextAndVersionAsync>d__4 ByRef) + 0x40 <-- Microsoft.CodeAnalysis.Razor.Workspaces.ni.dll+0x7ab38 (No unwind info)
123, Microsoft.CodeAnalysis.Razor.ProjectSystem.GeneratedDocumentTextLoader.LoadTextAndVersionAsync(Microsoft.CodeAnalysis.Workspace, Microsoft.CodeAnalysis.DocumentId, System.Threading.CancellationToken) + 0x59 <-- Microsoft.CodeAnalysis.Razor.Workspaces.ni.dll+0x844e5 (No unwind info)
124, Microsoft.CodeAnalysis.TextLoader+<LoadTextAsync>d__7.MoveNext() + 0x61 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x41c381 (No unwind info)
125, Microsoft.CodeAnalysis.TextLoader.LoadTextAsync(Microsoft.CodeAnalysis.Workspace, Microsoft.CodeAnalysis.DocumentId, System.Threading.CancellationToken) + 0x70 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x3f20b0 (No unwind info)
126, Microsoft.CodeAnalysis.TextDocumentState+<>c__DisplayClass25_0.<CreateRecoverableText>b__0(System.Threading.CancellationToken) + 0x21 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x409ce1 (No unwind info)
127, Roslyn.Utilities.AsyncLazy`1[[System.__Canon, mscorlib]].GetValueAsync(System.Threading.CancellationToken) + 0x1d9 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x3edb79 (No unwind info)
128, Microsoft.CodeAnalysis.RecoverableTextAndVersion+<GetValueAsync>d__15.MoveNext() + 0x2a2 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x41c9d2 (No unwind info)
129, Microsoft.CodeAnalysis.RecoverableTextAndVersion.GetValueAsync(System.Threading.CancellationToken) + 0x67 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x409ca7 (No unwind info)
130, Microsoft.CodeAnalysis.DocumentState+<FullyParseTreeAsync>d__20.MoveNext() + 0x12b <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x436e8b (No unwind info)
131, Microsoft.CodeAnalysis.DocumentState.FullyParseTreeAsync(Roslyn.Utilities.ValueSource`1<Microsoft.CodeAnalysis.TextAndVersion>, Microsoft.CodeAnalysis.ProjectId, System.String, Microsoft.CodeAnalysis.ParseOptions, Roslyn.Utilities.ValueSource`1<Microsoft.CodeAnalysis.AnalyzerConfigSet>, Microsoft.CodeAnalysis.Host.HostLanguageServices, Microsoft.CodeAnalysis.PreservationMode, System.Threading.CancellationToken) + 0x88 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x403da8 (No unwind info)
132, Microsoft.CodeAnalysis.DocumentState+<>c__DisplayClass19_0.<CreateLazyFullyParsedTree>b__0(System.Threading.CancellationToken) + 0x27 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x409f97 (No unwind info)
133, Roslyn.Utilities.AsyncLazy`1[[System.__Canon, mscorlib]].StartAsynchronousComputation(AsynchronousComputationToStart<System.__Canon>, Request<System.__Canon>, System.Threading.CancellationToken) + 0x69 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x3edc39 (No unwind info)
134, Roslyn.Utilities.AsyncLazy`1[[System.__Canon, mscorlib]].GetValueAsync(System.Threading.CancellationToken) + 0x1d9 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x3edb79 (No unwind info)
135, Microsoft.CodeAnalysis.DocumentState+<GetSyntaxTreeAsync>d__50.MoveNext() + 0x42 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x436c32 (No unwind info)
136, Microsoft.CodeAnalysis.DocumentState.GetSyntaxTreeAsync(System.Threading.CancellationToken) + 0x78 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x404428 (No unwind info)
137, Microsoft.CodeAnalysis.SolutionState+CompilationAndGeneratorDriverTranslationAction+AddDocumentsAction+<TransformCompilationAsync>d__2.MoveNext() + 0xe1 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x4550b9 (No unwind info)
138, Microsoft.CodeAnalysis.SolutionState+CompilationAndGeneratorDriverTranslationAction+AddDocumentsAction.TransformCompilationAsync(Microsoft.CodeAnalysis.Compilation, System.Threading.CancellationToken) + 0x6a <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x40a062 (No unwind info)
139, Microsoft.CodeAnalysis.SolutionState+CompilationTracker+<BuildDeclarationCompilationFromInProgressAsync>d__28.MoveNext() + 0xae <-- 0x284c2eee (No unwind info)
140, Microsoft.CodeAnalysis.SolutionState+CompilationTracker.BuildDeclarationCompilationFromInProgressAsync(Microsoft.CodeAnalysis.SolutionServices, InProgressState, Microsoft.CodeAnalysis.Compilation, System.Threading.CancellationToken) + 0x76 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x3ecd86 (No unwind info)
141, Microsoft.CodeAnalysis.SolutionState+CompilationTracker.BuildFinalStateFromInProgressStateAsync(Microsoft.CodeAnalysis.SolutionState, InProgressState, Microsoft.CodeAnalysis.Compilation, System.Threading.CancellationToken) + 0x71 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x3eccf1 (No unwind info)
142, Microsoft.CodeAnalysis.SolutionState+CompilationTracker.BuildCompilationInfoAsync(Microsoft.CodeAnalysis.SolutionState, System.Threading.CancellationToken) + 0x154 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x3ecac4 (No unwind info)
143, Microsoft.CodeAnalysis.SolutionState+CompilationTracker+<GetOrBuildCompilationInfoAsync>d__22.MoveNext() + 0x3d9 <-- 0x36324519 (No unwind info)
144, Microsoft.CodeAnalysis.DocumentState.BindSyntaxTreeToId(Microsoft.CodeAnalysis.SyntaxTree, Microsoft.CodeAnalysis.DocumentId) + 0xb1 <-- Microsoft.CodeAnalysis.Workspaces.ni.dll+0x436af1 (No unwind info)

Both of the above were happening while I was editting XML Doc comment for the newely added .razor component. The document itself was small at just ~40 lines.

UPDATE2: The slowdown also happens whenever edits inside of a *.razor file result in erroneous code, i.e. unclosed quotes, braces, parenthesis, or tags. This, of course, is very common thing while editing, since the code is incomplete while you are typing. So currently I have to be very careful when editing so as not to cause such slow downs by writing my code first in another editor and then pasting the correct code. At least that way if it does result in slowdown, it will be over after ~20 second, instead of being slowed down all the time while trying to type.

UPDATE3:

I thought I would mention that after several of such repeated 30-second slowdowns VS may:

  • Either crash completely (exit to desktop), or
  • Say that "a processed used by Visual Studio has encountered an unrecoverable error." with the following stack trace:
StreamJsonRpc.ConnectionLostException : The JSON-RPC connection with the remote party was lost before the request could complete.
   at async StreamJsonRpc.JsonRpc.InvokeCoreAsync(<Unknown Parameters>)
   at async StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](<Unknown Parameters>)
   at async Microsoft.CodeAnalysis.Remote.RemoteEndPoint.InvokeAsync[T](<Unknown Parameters>)

At which point VS will remain almost unresponsive regardless of how long you wait (until the process crashed it is usually possible to wait ~30 seconds while VS does its thing and then it's typing as normal). But after the process used by VS crashed, it will remain very unresponsive so restarting it is the only remedy at this point.

I can confirm / reproduce this. There's also some threads at the msdc describing this:

https://developercommunity.visualstudio.com/content/problem/814124/huge-performance-issues-utlimately-resulting-in-cr.html
https://developercommunity.visualstudio.com/content/problem/873214/very-slow-intellisense-in-large-blazor-project.html
et.al.

How can I be of more help, recording the behavior with the VS feedback tool was a gamble for me and I didn't manage yet to get a good trace of it. Is there anything else I could do to participate? This bug destroys my team's productivity.

@Phloog Glad I am not the only one experiencing this.

UPDATE4:

The slowdown _also_ happens when _closing .razor-file_ tabs in Visual Studio. The same ~30 second unresponsiveness with CPU being busy.

UPDATE5:
Sorry to keep posting updates, but I want to provide as much info as possible.
By now I have noticed that the unresponsiveness, as far as opening/closing .razor document tabs in VS goes, - is proportional to the number of such tabs being open in VS. I do have around 40-50 .razor-containing tabs open in VS (not all are fully loaded though during a session) - split across several windows, and the unresponsiveness that results is now up to 1 minute (I have recently opened additional 20 .razor tabs to quickly make repetitive changes to them and have noticed unresponsiveness time increased).
Also the unresponsiveness occurs when switching to a .razor tab for the first time during a solution session.

I just recorded a new trace for Microsoft in VS 2019 version 16.6. Here's the msdc thread: ​https://developercommunity.visualstudio.com/content/problem/1068764/high-cpu-load-and-bad-editor-responsiveness-in-bla.html

@fitdev have you resolved your slow down problems?
I have same issues.

More details can be found here
FeedbackTicket 1137024: Crashed while working on a Blazor .razor page

@mkArtakMSFT Link is not accessible or dead

@ahmetsekmen Not at all. Using VS 2019 16.7 Preview 2 and .Net 5 Preview 5 - all the issues are still there. It is basically unusable.

Fortunately I managed to create all the razor files I needed for the current stage of my project, and hence closed all razor tabs. But whenever I open one, regardless of VS feature flag settings (experimented with quite a few), there is a ~30 second slowdown. If I open several and do some editing, the slowdown will be worse and may lead to VS complaining about a process that it is using having crashed (does not say which process, but I am sure it has to do with razor tooling).

If it's of any relevance: enabling "Razor.LSP.Editor" flag (disabled by default) causes VS to freeze altogether when opening razor-containing documents w/o high cpu usage.

@fitdev Mine is not as much as bad like yours but i started to get discomfort. I was planing to change local machine.
What is your cpu in your local machine?

@ahmetsekmen I really don't think it's anything to do with the machine specs. I use a modern 2018 Intel Desktop CPU with 6 cores and 32GB Ram and a fast SSD. My solution as far as razor files are concerned is pretty small - less than 100 razor files and all of them spread across just 2 projects. Surely a system like this with a mere 100 razor files should not experience even a tenth of the slowdown / unresponsiveness that VS currently does with .razor files.

UPDATE6: Actually just noticed that the slowdown happens even with .cs files that contain _Razor Component Implementations_ (even when _all the .razor tabs_ are closed).

I have several Razor Components defined entirely in the .cs files w/o any Razor markup. They either implement IComponent interface or derive from ComponentBase and are thus constructed completely programmatically. However, they are used by the other components inside .razor files.

So, when I edited comments in of those files, VS, which was working smoothly for hours, froze for half a minute with the editor being unresponsive while CPU was busy. All this for editing a few words in a comment!

Since apparently my tracing of this this has been moved from the VisualStudio site to here (from this link: https://developercommunity.visualstudio.com/content/problem/1075952/very-slow-intellisense-in-blazor-project.html ) I will start following here.

I have all the same issues as described above. This makes the product unusable. I am also editing code using Visual Studio Code, and then having it update/compile in VS 2019 v 16.6.2 (.net core 3.1)
Once it gets itself wrapped up in the delays the only real solution is restarting the entire virtual machine I am running in. Closing and killing all the abandoned VS pieces never releases the leaked 10+GB of memory and performance will never really come back without a reboot.

My current project is a single razor page (about 1200 lines of markup/code) Everything else is just the standard boilerplate for a Blazor Server project.

I see a lot of closed issues that are not resolved and one suggestion of kicking this can down the road as just an annoyance. This makes the concept of trying to code a Blazor project with VS a non-starter.

I have the same issue in both VS for Windows (16.6.2) and Mac (8.6.5). The IDE basically becomes unusable when I start editing razor or razor.cs files (massive input lag and very high cpu usage). This is a pretty major issue in my opinion and should be prioritized accordingly.

More details can be found here
FeedbackTicket 1137024: Crashed while working on a Blazor .razor page

@mkArtakMSFT Link is not accessible or dead

This is for internal use - we have some more data reported through the VS Feedback, which will help the engineers if needed.

It would be nice if someone that was actually in charge of fixing this would give some kind of update. The product is unusable in it's current form. Period. I am waiting 20 seconds between tying characters at this point. This is not a performance issue - it is a bug. Have started recommending we abandon this Blazor / .Net core stuff since it is clearly not ready for production if we can't even get working tools. 30 days open and no updates is just crazy.

Is ANYONE able to actually do editing in any version of VS2019 with blazor/razor pages?

@jplepore I believe it was ok in VS 16.5, and I am pretty sure it became unusable sometime in the 16.6 timeframe. Now, with 16.7 Preview 3 it is still unusable.

@fitdev never feel bad about giving loads of updates. We appreciate all the help we can get. You mentioned:

I have several Razor Components defined entirely in the .cs files w/o any Razor markup. They either implement IComponent interface or derive from ComponentBase and are thus constructed completely programmatically. However, they are used by the other components inside .razor files.

So, when I edited comments in of those files, VS, which was working smoothly for hours, froze for half a minute with the editor being unresponsive while CPU was busy. All this for editing a few words in a comment!

Would you mind capturing a PerfView trace of what's happening when you're editing your C# Blazor component files.

It would be nice if someone that was actually in charge of fixing this would give some kind of update.

We're working really hard in fixing all of these issues in 16.7-Preview4. There's already loads of performance improvements we've gotten into the release that we're excited for the community to try. We're currently in the process of digging through everyone's ETL traces/dumps to ensure the work we've done so far has accounted for the nuisances you've all been encountering 😄

I've finished digging through all of the dumps and etl traces and we've accounted for all of the major performance issues present in them!

That being said there was 1 extra smaller performance issue I found when digging that we'll fix in 16.8-Preview1. It doesn't have a big enough footprint to warrant fixing it in 16.7-Preview4 so I envision most issues will be resolved then.

For now i'm going to close out this issue but @fitdev feel free to still respond here with information if you're able to get it and i'll follow up.

Installed VS 16.7 Preview 4. Enabled "Experimental Razor Editor". Now VS freezes a few seconds after opening/previewing any .razor file and needs to be restarted. Actually this behavior was there even in previous VS previews.

Disabled "Experimental Razor Editor". There was a short 10-second freeze after previewing first .razor file, then after making a few edits everything seemed to be ok. However VS reported that a process it uses crashed (did not say which one):

StreamJsonRpc.ConnectionLostException : The JSON-RPC connection with the remote party was lost before the request could complete. ---> System.OperationCanceledException : The operation was canceled.
   at System.Threading.CancellationToken.ThrowOperationCanceledException()
   at async StreamJsonRpc.MessageHandlerBase.WriteAsync(<Unknown Parameters>)
   at async StreamJsonRpc.JsonRpc.TransmitAsync(<Unknown Parameters>)
   at System.Threading.Tasks.ValueTask.ThrowIfCompletedUnsuccessfully()
   at async StreamJsonRpc.JsonRpc.InvokeCoreAsync(<Unknown Parameters>)
   --- End of inner exception stack trace ---
   at async StreamJsonRpc.JsonRpc.InvokeCoreAsync(<Unknown Parameters>)
   at async StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](<Unknown Parameters>)
   at async Microsoft.CodeAnalysis.Remote.RemoteEndPoint.InvokeAsync[T](<Unknown Parameters>)

Though I am not sure at this point if this process crash is related to Razor Tooling.

Will report more info as I test it out.

This absolutely has not been fixed and in fact seems worse. The only thing that appears to help is once I get the JSON-RPC error message posed by fitdev above, it seems things work better. Guessing that process has something to do with the slowdown, although not all of it.

It would be nice to not just keep closing tickets before verifying they are complete.

Are we supposed to start another ticket and start this process all over again?

@fitdev ya that may or may not be Razor tooling related. @jplepore is it possible to provide a project that exemplifies the issues you're having?

Was this page helpful?
0 / 5 - 0 ratings