
Suspected commit according to meeting https://github.com/dotnet/efcore/pull/19517/files
Does initializing context also initializes DbSets even if not used?
@smitpatel That's pretty much the only thing that happens before a context is used https://github.com/dotnet/efcore/blob/master/src/EFCore/DbContext.cs#L112
And if we can confirm that https://github.com/dotnet/efcore/pull/19517 caused it we don't have or really can fix it
Should be really easy to simply run the benchmark on the cmdline on both commits to check (let me know if you run into trouble).
Seems like @roji is volunteering to verify the commit for regression.
That was not quite the semantic content of my message... however:
BenchmarkDotNet=v0.11.3, OS=ubuntu 19.10
Intel Xeon W-2133 CPU 3.60GHz, 1 CPU, 12 logical and 6 physical cores
.NET Core SDK=3.1.100
[Host] : .NET Core 3.1.1 (CoreCLR 4.700.19.60701, CoreFX 4.700.19.60801), 64bit RyuJIT
Toolchain=InProcessToolchain
| Method | Mean | Error | StdDev | Gen 0/1k Op | Gen 1/1k Op | Gen 2/1k Op | Allocated Memory/Op |
|------------------------------ |---------:|---------:|---------:|------------:|------------:|------------:|--------------------:|
| CreateAndDisposeUnusedContext | 142.0 ms | 1.142 ms | 1.068 ms | 34250.0000 | - | - | 141.75 MB |
BenchmarkDotNet=v0.11.3, OS=ubuntu 19.10
Intel Xeon W-2133 CPU 3.60GHz, 1 CPU, 12 logical and 6 physical cores
.NET Core SDK=3.1.100
[Host] : .NET Core 3.1.1 (CoreCLR 4.700.19.60701, CoreFX 4.700.19.60801), 64bit RyuJIT
Toolchain=InProcessToolchain
| Method | Mean | Error | StdDev | Median | Gen 0/1k Op | Gen 1/1k Op | Gen 2/1k Op | Allocated Memory/Op |
|------------------------------ |---------:|---------:|---------:|---------:|------------:|------------:|------------:|--------------------:|
| CreateAndDisposeUnusedContext | 193.7 ms | 3.860 ms | 9.825 ms | 188.1 ms | 38000.0000 | - | - | 158.54 MB |
For reference, running is super simple has no hard dependency on @roji:
That was not quite the semantic content of my message... however:
Oops! My mistake! 馃槈
I have ideas.