Skip to content

Add benchmark for large number of ConfigurationProvider - #2572

Merged
adamsitnik merged 11 commits into
dotnet:mainfrom
wangyuantao:yuantw/sort
Aug 30, 2022
Merged

adamsitnik merged 11 commits into
dotnet:mainfrom
wangyuantao:yuantw/sort

Conversation

@wangyuantao

@wangyuantao wangyuantao commented Aug 19, 2022 •

Copy link
Copy Markdown
Contributor

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

dnfadmin commented Aug 19, 2022 •

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@wangyuantao
wangyuantao requested a review from eerhardt August 23, 2022 04:05

@eerhardt eerhardt left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
Member

@eerhardt the failures are #2564 and #2575

wangyuantao and others added 2 commits August 26, 2022 16:59
@wangyuantao
wangyuantao requested a review from adamsitnik August 29, 2022 02:12
@wangyuantao wangyuantao changed the title Add benchmark of Microsoft.Extensions.Configuration.Binder Add benchmark for large number of ConfigurationProvider Aug 29, 2022

@eerhardt eerhardt left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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