Skip to content
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

[Perf] Regressions in Microsoft.Extensions.DependencyInjection.GetServiceIEnumerable #54170

Closed
DrewScoggins opened this issue Jun 14, 2021 · 14 comments
Labels
Milestone

Comments

@DrewScoggins
Copy link
Member

Run Information

Architecture arm64
OS Windows 10.0.19041
Baseline 5f15498d937653986821d636c04cd03c58d4bb4c
Compare 293d47286161827ecc0d6e96f9eb7b82dafe8307
Diff Diff

Regressions in Microsoft.Extensions.DependencyInjection.GetServiceIEnumerable

Benchmark Baseline Test Test/Base Test Quality Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
Scoped - Duration of single invocation 84.69 ns 107.57 ns 1.27 0.34
Transient - Duration of single invocation 160.48 ns 7.33 μs 45.66 0.41

graph
graph
Historical Data in Reporting System

Repro

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter 'Microsoft.Extensions.DependencyInjection.GetServiceIEnumerable*'

Payloads

Baseline
Compare

Histogram

Microsoft.Extensions.DependencyInjection.GetServiceIEnumerable.Scoped


Microsoft.Extensions.DependencyInjection.GetServiceIEnumerable.Transient


Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository

@DrewScoggins DrewScoggins added arch-arm64 os-linux Linux OS (any supported distro) os-windows tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark arch-x64 labels Jun 14, 2021
@dotnet-issue-labeler dotnet-issue-labeler bot added area-Extensions-DependencyInjection untriaged New issue has not been triaged by the area owner labels Jun 14, 2021
@ghost
Copy link

ghost commented Jun 14, 2021

Tagging subscribers to this area: @eerhardt, @maryamariyan
See info in area-owners.md if you want to be subscribed.

Issue Details

Run Information

Architecture arm64
OS Windows 10.0.19041
Baseline 5f15498d937653986821d636c04cd03c58d4bb4c
Compare 293d47286161827ecc0d6e96f9eb7b82dafe8307
Diff Diff

Regressions in Microsoft.Extensions.DependencyInjection.GetServiceIEnumerable

Benchmark Baseline Test Test/Base Test Quality Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
Scoped - Duration of single invocation 84.69 ns 107.57 ns 1.27 0.34
Transient - Duration of single invocation 160.48 ns 7.33 μs 45.66 0.41

graph
graph
Historical Data in Reporting System

Repro

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter 'Microsoft.Extensions.DependencyInjection.GetServiceIEnumerable*'

Payloads

Baseline
Compare

Histogram

Microsoft.Extensions.DependencyInjection.GetServiceIEnumerable.Scoped


Microsoft.Extensions.DependencyInjection.GetServiceIEnumerable.Transient


Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository

Author: DrewScoggins
Assignees: -
Labels:

arch-arm64, arch-x64, area-Extensions-DependencyInjection, os-linux, os-windows, tenet-performance, tenet-performance-benchmarks, untriaged

Milestone: -

@DrewScoggins
Copy link
Member Author

#52140

@DrewScoggins DrewScoggins changed the title [Perf] Changes at 5/26/2021 7:46:28 AM [Perf] Regressions in Microsoft.Extensions.DependencyInjection.GetServiceIEnumerable Jun 14, 2021
@eerhardt
Copy link
Member

@davidfowl @pakrym

@maryamariyan maryamariyan added this to the 6.0.0 milestone Jun 17, 2021
@maryamariyan maryamariyan removed the untriaged New issue has not been triaged by the area owner label Jun 17, 2021
@maryamariyan
Copy link
Member

here are the latest charts:

newplot (9)

newplot (10)

@davidfowl
Copy link
Member

So only enumerables regressed?

@pakrym
Copy link
Contributor

pakrym commented Aug 3, 2021

Did my change prevent IEnumerable accessors from being compiled? The jump is very high for transient.

@davidfowl
Copy link
Member

We need to look into it, last time we regressed the perf it was throwing exceptions and nobody knew 😄

@pakrym
Copy link
Contributor

pakrym commented Aug 4, 2021

Yeah, I think it might be IL building process failing. we need to add a debug.Fail somewhere :)

@davidfowl
Copy link
Member

@pakrym spot the bug

_realizedServices[callSite.ImplementationType] = accessor;

@eerhardt
Copy link
Member

eerhardt commented Aug 5, 2021

@maryamariyan is working on getting perf numbers with this fixed. My hope is it fixes these regressions.

@pakrym
Copy link
Contributor

pakrym commented Aug 5, 2021

Oh no, 🤦 ImplementationType..

@maryamariyan
Copy link
Member

@maryamariyan is working on getting perf numbers with this fixed. My hope is it fixes these regressions.

yes, more info available in this comment #56781 (comment)

@eerhardt
Copy link
Member

Fixed by #57155.

@ghost ghost locked as resolved and limited conversation to collaborators Sep 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants