-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
ClientModel: Shared HttpClient in PipelineTransport, and a couple more updates #41455
Merged
annelo-msft
merged 9 commits into
Azure:main
from
annelo-msft:clientmodel-shared-httpclient
Jan 23, 2024
Merged
ClientModel: Shared HttpClient in PipelineTransport, and a couple more updates #41455
annelo-msft
merged 9 commits into
Azure:main
from
annelo-msft:clientmodel-shared-httpclient
Jan 23, 2024
Conversation
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
annelo-msft
requested review from
KrzysztofCwalina,
tg-msft,
JoshLove-msft and
christothes
as code owners
January 22, 2024 19:00
annelo-msft
requested review from
jsquire,
AlexanderSher,
pallavit and
m-nash
January 22, 2024 19:00
m-nash
reviewed
Jan 22, 2024
sdk/core/System.ClientModel/src/ModelReaderWriter/ModelReaderWriter.cs
Outdated
Show resolved
Hide resolved
sdk/core/System.ClientModel/src/ModelReaderWriter/ModelReaderWriter.cs
Outdated
Show resolved
Hide resolved
API change check APIView has identified API level changes in this PR and created following API reviews. |
christothes
reviewed
Jan 22, 2024
sdk/core/System.ClientModel/src/Pipeline/HttpClientPipelineTransport.cs
Outdated
Show resolved
Hide resolved
christothes
reviewed
Jan 22, 2024
sdk/core/System.ClientModel/src/Pipeline/HttpClientPipelineTransport.cs
Outdated
Show resolved
Hide resolved
m-nash
reviewed
Jan 22, 2024
christothes
approved these changes
Jan 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR contains three changes:
1. Use a shared HttpClient instance in HttpClientPipelineTransport
Requested in this PR comment, this change was postponed because it complicates HttpClientPipelineTransport's Dispose method given the need to do reference counting on the shared HttpClient used by possibly multiple transport instances.
Fixes #41301
2. Change ClientRetryPolicy.WaitAsync method return types to Task
Since ValueTask is slower if the method does not return synchronously, and the Wait* methods are expected to wait some time interval before returning, changing these methods to return Task instead to get the perf benefit in the majority case.
3. Isolating "should write as JSON" logic to a single place
Addressing feedback from this PR comment. This moves the logic to decide whether to write a persistable model as JSON to a single place and gives a higher hit rate on the high-performance model-writing path from BinaryContent.