-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
ApplyServices() in DbContextOptionsBuilder.IsConfigured is problematic for perf #16045
Labels
area-perf
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-enhancement
Milestone
Comments
Closed
ajcvickers
added a commit
that referenced
this issue
Jun 16, 2019
Also stop calling ApplyServices to find out if an extension is a database provider. Fixes #16045 Doing this refactoring because we keep having to add/change methods here, so putting them in a composed abstract base class to avoid breaking the interface each time.
ajcvickers
added
the
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
label
Jun 16, 2019
This was referenced Jun 16, 2019
Broke out the breaking change into a separate issue: #16119 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-perf
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-enhancement
Commit 188dbf4 changed the
DbContextOptionsBuilder.IsConfigured
property to callApplyServices()
on all options extensions, in order to fix #13228. Calling TryAdd on all EF services has a significant perf cost.Discovered as a result of #15173, where
ApplyServices()
also caused a DiagnosticListener leak.Here are some benchmark results:
BenchmarkDotNet=v0.11.5, OS=Windows 10.0.17763.437 (1809/October2018Update/Redstone5)
Intel Xeon W-2133 CPU 3.60GHz, 1 CPU, 12 logical and 6 physical cores
.NET Core SDK=2.2.103
[Host] : .NET Core 2.2.4 (CoreCLR 4.6.27521.02, CoreFX 4.6.27521.01), 64bit RyuJIT
DefaultJob : .NET Core 2.2.4 (CoreCLR 4.6.27521.02, CoreFX 4.6.27521.01), 64bit RyuJIT
Current IsConfiguring (with ApplyServices)
Previous (light):
Previous IsConfiguring (without ApplyServices)
Benchmark code
The text was updated successfully, but these errors were encountered: