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

[Hotfix] Binary Encoding: Fixes Performance Regression on CI Pipeline #4953

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

kundadebdatta
Copy link
Member

@kundadebdatta kundadebdatta commented Jan 8, 2025

Pull Request Template

Description

Recently during our v3 sdk CI rolling runs, we observed some performance regressions on the ItemStreamAsync() APIs. They regressed beyond 5%.

image

Upon doing further investigation, we figured out that during the non-binary flow, we end up converting the incoming stream into CloneableStream which might be the reason for this regression. Please note that the reason this was not caught during the original version of the binary encoding
PR
was that the performance test used to capture the benchmark for the original PR, was targeted a real cosmos container, where for the CI runs, we use our mocked containers.

This PR skips CloneableStream conversation for non-binary encoding flow.

With the above change in place, our CI builds started passing:

image

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Closing issues

To automatically close an issue: closes #IssueNumber

Pull Request Template

Description

Please include a summary of the change and which issue is fixed. Include samples if adding new API, and include relevant motivation and context. List any dependencies that are required for this change.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Closing issues

To automatically close an issue: closes #IssueNumber

# Pull Request Template

## Description

Recently during our v3 sdk CI rolling runs, we observed some performance
regressions on the `ItemStreamAsync()` APIs. They regressed beyond 5%.


![image](https://github.com/user-attachments/assets/66cc4f01-2ec6-47e0-b885-5ad74e02bb63)

Upon doing further investigation, we figured out that during the
non-binary flow, we end up converting the incoming stream into
`CloneableStream` which might be the reason for this regression. Please
note that the reason this was not caught during the [original version of
the binary encoding
PR](#4652) was that
the performance test used to capture the benchmark for the original PR,
was targeted a real cosmos container, where for the CI runs, we use our
mocked containers.

This PR skips `CloneableStream` conversation for non-binary encoding
flow.

With the above change in place, our CI builds started passing:


![image](https://github.com/user-attachments/assets/8293a6e5-6fbc-4953-9de0-37162a081194)

## Type of change

Please delete options that are not relevant.

- [x] Bug fix (non-breaking change which fixes an issue)

## Closing issues

To automatically close an issue: closes #IssueNumber
@kundadebdatta kundadebdatta changed the title [Internal] Binary Encoding: Fixes Performance Regression [Hotfix] Binary Encoding: Fixes Performance Regression on CI Pipeline Jan 8, 2025
@kundadebdatta kundadebdatta marked this pull request as ready for review January 8, 2025 18:27
@kundadebdatta kundadebdatta self-assigned this Jan 8, 2025
@kundadebdatta kundadebdatta added the auto-merge Enables automation to merge PRs label Jan 8, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot enabled auto-merge (squash) January 8, 2025 18:29
@kirankumarkolli kirankumarkolli merged commit e9fa019 into releases/3.46.1 Jan 8, 2025
26 checks passed
@kirankumarkolli kirankumarkolli deleted the users/kundadebdatta/hotfix/3.46.1 branch January 8, 2025 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge Enables automation to merge PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants