Open davkean opened 5 years ago
Look at the trace, this looks to be caused by GC:
•% Time paused for Garbage Collection: 70.1%
•% CPU Time spent Garbage Collecting: 16.8%
Gen | Count | MaxPause | MaxPeak MB | Max AllocMB/sec | TotalPause | TotalAlloc MB | Alloc MB/MSec GC | Survived MB/MSec GC | MeanPause | Induced |
---|---|---|---|---|---|---|---|---|---|---|
ALL | 217 | 78.7 | 1,359.1 | 591.740 | 8,995.3 | 971.2 | 0.1 | 0.041 | 41.5 | 0 |
0 | 115 | 74.4 | 1,355.9 | 552.974 | 4,402.8 | 496.6 | 4.5 | 0.024 | 38.3 | 0 |
1 | 102 | 78.7 | 1,359.1 | 591.740 | 4,592.4 | 474.7 | 4.7 | 0.057 | 45.0 | 0 |
2 | 0 | 0.0 | 0.0 | 0.000 | 0.0 | 0.0 | 0.0 | NaN | NaN | 0 |
These are the top allocations:
Other than GC, almost all the CPU is used by:
microsoft.codeanalysis.features.ni!Microsoft.CodeAnalysis.Diagnostics.EngineV2.DiagnosticIncrementalAnalyzer+LatestDiagnosticsForSpanGetter+<TryGetAsync>d__14.MoveNext()
Visual Studio is completely unusable in this state until you close all the documents.
Note I open the C# equivalent here: https://github.com/dotnet/roslyn/issues/37264, which looks different.
@davkean The total amount of allocations in the trace don't seem significant enough to cause problems like you describe. It would help to have the combination of performance trace and heap dump like the vsfeedback system submits for https://aka.ms/reportPerf.
The repro steps have a clear steps to reproduce this to get any data you would like.
Version Used: Version 15.9.13 - does not repro Version 16.2.0 Preview 4.0 [29029.12.d16.2stg] - repros
Steps to Reproduce:
-- Clone Repo --
cd project-system
project-system> build
project-system> ProjectSystem.sln
-- Disable designers (they will prevent you from opening all the files) --
Open With
->Visual Basic Editor
->Set As Default
Open With
->Visual Basic Editor
->Set As Default
Open With
->Visual Basic Editor
->Set As Default
-- Open files --
File
->Open
, navigate to the project-system folder aboveext:"vb"
CTRL+A
to select all, and chooseOpen
-- Wait for files to open --
EnableDisableWarningControls
right-click on parameter and click RenameExpected Behavior: No UI delays
Actual Behavior: Visual Studio has constant delays that prevent you from interacting with it.
Trace is [internalshare]\davkean\Roslyn\36899.