-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Optimize the performance of InternalConfigurationRootExtensions.GetChildrenImplementation #74736
Closed
Closed
Changes from 14 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
ec3d066
sort out side of GetChildKeys
yuantao-wang 74c0481
use ConfigurationKeyComparer
yuantao-wang fd62e93
back compat draft
yuantao-wang 652f06e
no linq
yuantao-wang 02d617b
add test
yuantao-wang d3e76f2
add more unit test
yuantao-wang dee5149
default interface method
yuantao-wang a2fb431
rename minor change
yuantao-wang 61b2d4d
revert
yuantao-wang f1bd50c
revert
yuantao-wang 0800c39
simplify
yuantao-wang 8123003
miss sort
yuantao-wang 511e20d
is it a breaking change?
yuantao-wang bfa8d36
indent
yuantao-wang 4bf47c5
Update src/libraries/Microsoft.Extensions.Configuration/src/InternalC…
wangyuantao 2258459
let client decide
yuantao-wang 81acb66
Merge branch 'dotnet:main' into yuantw/getchildkeysnosort
wangyuantao 4ab3015
revert
wangyuantao 36998c9
revert
wangyuantao 31d7537
revert
wangyuantao a2d063d
revert
wangyuantao be32179
revert
wangyuantao 6a863ac
sort once
wangyuantao f0406de
fix test
yuantao-wang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is tantamount to the following unless we take advantage of the new
GetChildKeys
interface method in ourConfigurationProvider
andChainedConfigurationProvider
classes to stop sorting since that would be non-breaking.If the problem is just the bad asymptotic cost of resorting previous keys for each additional provider, and not sorting keys internally, I don't think we need the new interface.
However, we then still need to sort all the keys at the end of the
GetChildrenImplementation
to avoid breaking callers that expect sorted keys from defaultIConfiguration.GetChildren()
implementations.I'm not sure we need to be worried about developers using the last provider to hijack the
earlierKeys
from earlier providers. Does anyone know of anything that does this?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another idea for back compat is to let caller decide the implementation. For commonly used caller like Binder, we know the optimized path can be used for sure. How do you think? Send a new iteration for brainstorming.