diff --git a/BenchmarkDotNet.Artifacts/results/IdeCoreBenchmarks.ProjectOperationBenchmarks.IterateDocuments-report-github.md b/BenchmarkDotNet.Artifacts/results/IdeCoreBenchmarks.ProjectOperationBenchmarks.IterateDocuments-report-github.md deleted file mode 100644 index e52041f78300c..0000000000000 --- a/BenchmarkDotNet.Artifacts/results/IdeCoreBenchmarks.ProjectOperationBenchmarks.IterateDocuments-report-github.md +++ /dev/null @@ -1,20 +0,0 @@ -``` ini - -BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19042 -AMD Ryzen Threadripper 3960X, 1 CPU, 48 logical and 24 physical cores - [Host] : .NET Framework 4.8 (4.8.4300.0), X64 RyuJIT - DefaultJob : .NET Framework 4.8 (4.8.4300.0), X64 RyuJIT - - -``` -| Method | DocumentCount | Mean | Error | StdDev | Median | Gen 0 | Gen 1 | Gen 2 | Allocated | -|-------------------------- |-------------- |----------------:|--------------:|--------------:|----------------:|-------:|-------:|------:|----------:| -| **Project.DocumentIds** | **0** | **23.34 ns** | **0.494 ns** | **0.891 ns** | **22.91 ns** | **-** | **-** | **-** | **-** | -| Project.Documents | 0 | 77.22 ns | 0.537 ns | 0.502 ns | 77.31 ns | 0.0772 | - | - | 128 B | -| Solution.WithDocumentText | 0 | 14.60 ns | 0.324 ns | 0.690 ns | 14.57 ns | - | - | - | - | -| **Project.DocumentIds** | **100** | **8,159.41 ns** | **10.113 ns** | **8.965 ns** | **8,157.79 ns** | **0.0305** | **-** | **-** | **72 B** | -| Project.Documents | 100 | 16,356.60 ns | 97.365 ns | 91.076 ns | 16,382.64 ns | 0.0916 | - | - | 201 B | -| Solution.WithDocumentText | 100 | 14,436.90 ns | 355.846 ns | 1,015.248 ns | 14,392.68 ns | 0.8240 | 0.2136 | - | 5285 B | -| **Project.DocumentIds** | **10000** | **863,988.25 ns** | **1,297.511 ns** | **1,213.693 ns** | **863,625.88 ns** | **-** | **-** | **-** | **80 B** | -| Project.Documents | 10000 | 1,861,933.16 ns | 11,538.506 ns | 10,793.125 ns | 1,859,064.65 ns | - | - | - | 208 B | -| Solution.WithDocumentText | 10000 | 14,088.55 ns | 281.041 ns | 453.828 ns | 14,003.49 ns | 0.8698 | 0.2289 | - | 5539 B | diff --git a/BenchmarkDotNet.Artifacts/results/IdeCoreBenchmarks.ProjectOperationBenchmarks.IterateDocuments-report.csv b/BenchmarkDotNet.Artifacts/results/IdeCoreBenchmarks.ProjectOperationBenchmarks.IterateDocuments-report.csv deleted file mode 100644 index ea47e1cefa272..0000000000000 --- a/BenchmarkDotNet.Artifacts/results/IdeCoreBenchmarks.ProjectOperationBenchmarks.IterateDocuments-report.csv +++ /dev/null @@ -1,10 +0,0 @@ -Method,Job,AnalyzeLaunchVariance,EvaluateOverhead,MaxAbsoluteError,MaxRelativeError,MinInvokeCount,MinIterationTime,OutlierMode,Affinity,EnvironmentVariables,Jit,Platform,PowerPlanMode,Runtime,AllowVeryLargeObjects,Concurrent,CpuGroups,Force,HeapAffinitizeMask,HeapCount,NoAffinitize,RetainVm,Server,Arguments,BuildConfiguration,Clock,EngineFactory,NuGetReferences,Toolchain,IsMutator,InvocationCount,IterationCount,IterationTime,LaunchCount,MaxIterationCount,MaxWarmupIterationCount,MinIterationCount,MinWarmupIterationCount,RunStrategy,UnrollFactor,WarmupCount,DocumentCount,Mean,Error,StdDev,Median,Gen 0,Gen 1,Gen 2,Allocated -Project.DocumentIds,DefaultJob,False,Default,Default,Default,Default,Default,Default,111111111111111111111111111111111111111111111111,Empty,RyuJit,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 4.8,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,1,Default,Default,Default,Default,Default,Default,Default,Default,16,Default,0,23.34 ns,0.494 ns,0.891 ns,22.91 ns,0.0000,0.0000,0.0000,0 B -Project.Documents,DefaultJob,False,Default,Default,Default,Default,Default,Default,111111111111111111111111111111111111111111111111,Empty,RyuJit,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 4.8,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,1,Default,Default,Default,Default,Default,Default,Default,Default,16,Default,0,77.22 ns,0.537 ns,0.502 ns,77.31 ns,0.0772,0.0000,0.0000,128 B -Solution.WithDocumentText,DefaultJob,False,Default,Default,Default,Default,Default,Default,111111111111111111111111111111111111111111111111,Empty,RyuJit,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 4.8,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,1,Default,Default,Default,Default,Default,Default,Default,Default,16,Default,0,14.60 ns,0.324 ns,0.690 ns,14.57 ns,0.0000,0.0000,0.0000,0 B -Project.DocumentIds,DefaultJob,False,Default,Default,Default,Default,Default,Default,111111111111111111111111111111111111111111111111,Empty,RyuJit,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 4.8,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,1,Default,Default,Default,Default,Default,Default,Default,Default,16,Default,100,"8,159.41 ns",10.113 ns,8.965 ns,"8,157.79 ns",0.0305,0.0000,0.0000,72 B -Project.Documents,DefaultJob,False,Default,Default,Default,Default,Default,Default,111111111111111111111111111111111111111111111111,Empty,RyuJit,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 4.8,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,1,Default,Default,Default,Default,Default,Default,Default,Default,16,Default,100,"16,356.60 ns",97.365 ns,91.076 ns,"16,382.64 ns",0.0916,0.0000,0.0000,201 B -Solution.WithDocumentText,DefaultJob,False,Default,Default,Default,Default,Default,Default,111111111111111111111111111111111111111111111111,Empty,RyuJit,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 4.8,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,1,Default,Default,Default,Default,Default,Default,Default,Default,16,Default,100,"14,436.90 ns",355.846 ns,"1,015.248 ns","14,392.68 ns",0.8240,0.2136,0.0000,5285 B -Project.DocumentIds,DefaultJob,False,Default,Default,Default,Default,Default,Default,111111111111111111111111111111111111111111111111,Empty,RyuJit,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 4.8,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,1,Default,Default,Default,Default,Default,Default,Default,Default,16,Default,10000,"863,988.25 ns","1,297.511 ns","1,213.693 ns","863,625.88 ns",0.0000,0.0000,0.0000,80 B -Project.Documents,DefaultJob,False,Default,Default,Default,Default,Default,Default,111111111111111111111111111111111111111111111111,Empty,RyuJit,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 4.8,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,1,Default,Default,Default,Default,Default,Default,Default,Default,16,Default,10000,"1,861,933.16 ns","11,538.506 ns","10,793.125 ns","1,859,064.65 ns",0.0000,0.0000,0.0000,208 B -Solution.WithDocumentText,DefaultJob,False,Default,Default,Default,Default,Default,Default,111111111111111111111111111111111111111111111111,Empty,RyuJit,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 4.8,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,1,Default,Default,Default,Default,Default,Default,Default,Default,16,Default,10000,"14,088.55 ns",281.041 ns,453.828 ns,"14,003.49 ns",0.8698,0.2289,0.0000,5539 B diff --git a/BenchmarkDotNet.Artifacts/results/IdeCoreBenchmarks.ProjectOperationBenchmarks.IterateDocuments-report.html b/BenchmarkDotNet.Artifacts/results/IdeCoreBenchmarks.ProjectOperationBenchmarks.IterateDocuments-report.html deleted file mode 100644 index f30fbcc870850..0000000000000 --- a/BenchmarkDotNet.Artifacts/results/IdeCoreBenchmarks.ProjectOperationBenchmarks.IterateDocuments-report.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - -IdeCoreBenchmarks.ProjectOperationBenchmarks.IterateDocuments-20210223-114823 - - - - -

-BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19042
-AMD Ryzen Threadripper 3960X, 1 CPU, 48 logical and 24 physical cores
-  [Host]     : .NET Framework 4.8 (4.8.4300.0), X64 RyuJIT
-  DefaultJob : .NET Framework 4.8 (4.8.4300.0), X64 RyuJIT
-
-
- - - - - - - - - - - - - -
MethodDocumentCount Mean Error StdDev MedianGen 0Gen 1Gen 2Allocated
Project.DocumentIds023.34 ns0.494 ns0.891 ns22.91 ns----
Project.Documents077.22 ns0.537 ns0.502 ns77.31 ns0.0772--128 B
Solution.WithDocumentText014.60 ns0.324 ns0.690 ns14.57 ns----
Project.DocumentIds1008,159.41 ns10.113 ns8.965 ns8,157.79 ns0.0305--72 B
Project.Documents10016,356.60 ns97.365 ns91.076 ns16,382.64 ns0.0916--201 B
Solution.WithDocumentText10014,436.90 ns355.846 ns1,015.248 ns14,392.68 ns0.82400.2136-5285 B
Project.DocumentIds10000863,988.25 ns1,297.511 ns1,213.693 ns863,625.88 ns---80 B
Project.Documents100001,861,933.16 ns11,538.506 ns10,793.125 ns1,859,064.65 ns---208 B
Solution.WithDocumentText1000014,088.55 ns281.041 ns453.828 ns14,003.49 ns0.86980.2289-5539 B
- - diff --git a/src/Workspaces/Core/Portable/Workspace/Solution/Project.cs b/src/Workspaces/Core/Portable/Workspace/Solution/Project.cs index d734b3883b8fd..be943efd7c01a 100644 --- a/src/Workspaces/Core/Portable/Workspace/Solution/Project.cs +++ b/src/Workspaces/Core/Portable/Workspace/Solution/Project.cs @@ -262,7 +262,7 @@ public async ValueTask> GetSourceGeneratedD { var generatedDocumentStates = await _solution.State.GetSourceGeneratedDocumentStatesAsync(this.State, cancellationToken).ConfigureAwait(false); - // return an interator to avoid eagerly allocating all the document instances + // return an iterator to avoid eagerly allocating all the document instances return generatedDocumentStates.States.Select(state => ImmutableHashMapExtensions.GetOrAdd(ref _idToSourceGeneratedDocumentMap, state.Id, s_createSourceGeneratedDocumentFunction, (state, this)))!; }