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

Add benchmark for large number of ConfigurationProvider #2572

Merged
merged 11 commits into from
Aug 30, 2022

Conversation

wangyuantao
Copy link
Contributor

@wangyuantao wangyuantao commented Aug 19, 2022

InternalConfigurationRootExtensions.GetChildrenImplementation performance can be improved - the time complexity is none-linearly increasing with the ConfigurationProvider count.

Method ConfigurationProvidersCount KeysCountPerProvider Mean Error StdDev Median Min Max Gen 0 Gen 1 Allocated
Get 8 10 596.7 us 3.02 us 2.68 us 595.3 us 593.8 us 601.5 us 93.7500 - 399.91 KB
Get 8 20 1,356.1 us 7.20 us 6.39 us 1,356.2 us 1,347.0 us 1,370.6 us 204.5455 - 870.41 KB
Get 8 40 3,093.9 us 27.59 us 23.04 us 3,090.9 us 3,063.6 us 3,142.3 us 455.6962 25.3165 1955.57 KB
Get 16 10 2,369.3 us 50.63 us 58.31 us 2,344.8 us 2,297.9 us 2,486.4 us 343.7500 - 1467.93 KB
Get 16 20 5,528.9 us 108.01 us 101.03 us 5,511.9 us 5,422.6 us 5,740.6 us 777.7778 66.6667 3278.57 KB
Get 16 40 12,783.1 us 254.98 us 238.51 us 12,826.2 us 12,416.2 us 13,207.8 us 1750.0000 62.5000 7446.58 KB
Get 32 10 10,895.5 us 82.95 us 64.76 us 10,892.3 us 10,814.7 us 11,028.9 us 1590.9091 136.3636 6715.57 KB
Get 32 20 24,598.7 us 841.96 us 935.83 us 24,001.3 us 23,732.4 us 26,550.0 us 3375.0000 - 14451.19 KB
Get 32 40 53,304.3 us 402.64 us 356.93 us 53,276.8 us 52,694.5 us 54,120.3 us 7500.0000 250.0000 32475.59 KB

@dnfadmin
Copy link

dnfadmin commented Aug 19, 2022

CLA assistant check
All CLA requirements met.

Copy link
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the contribution!

@eerhardt
Copy link
Member

@adamsitnik - are the CI failures expected? I tried looking at them, and none of them seemed related to this change, but I couldn't be sure.

@adamsitnik
Copy link
Member

@eerhardt the failures are #2564 and #2575

@wangyuantao wangyuantao changed the title Add benchmark of Microsoft.Extensions.Configuration.Binder Add benchmark for large number of ConfigurationProvider Aug 29, 2022
Copy link
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the contribution.

@adamsitnik adamsitnik merged commit c44fc42 into dotnet:main Aug 30, 2022
@wangyuantao
Copy link
Contributor Author

Thank you for reviewing my code and get them merged, @eerhardt @IDisposable @adamsitnik !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants