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

Performance: Adds query improvement to avoid ImmutableDictionary #2861

Merged
merged 5 commits into from
Nov 9, 2021

Conversation

sourabh1007
Copy link
Contributor

@sourabh1007 sourabh1007 commented Nov 8, 2021

Description

Changed AdditionalHeaders variable type to IReadOnlyDictionary from ImmutableDictionary in order to avoid the creation on this object on every call unnecessarily.

Fixes 1 of the 3 issues: #2815

Performane Test Result (Without this change):
image

Performane Test Result (With this change):
image

As you see above screenshots, Memory allocation has been reduced to 0-.2%.

Type of change

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

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Please follow the required format: "[Internal] Category: (Adds|Fixes|Refactors|Removes) Description"

Internal should be used for PRs that have no customer impact. This flag is used to help generate the changelog to know which PRs should be included. Examples:
Diagnostics: Adds GetElapsedClientLatency to CosmosDiagnostics
PartitionKey: Fixes null reference when using default(PartitionKey)
[v4] Client Encryption: Refactors code to external project
[Internal] Query: Adds code generator for CosmosNumbers for easy additions in the future.

@sourabh1007 sourabh1007 changed the title Performance Improvement : Change ImmutableDictionary to IReadOnlyDictionary in Page [Internal] Performance Improvement : Change ImmutableDictionary to IReadOnlyDictionary in Page Nov 8, 2021
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Please follow the required format: "[Internal] Category: (Adds|Fixes|Refactors|Removes) Description"

Internal should be used for PRs that have no customer impact. This flag is used to help generate the changelog to know which PRs should be included. Examples:
Diagnostics: Adds GetElapsedClientLatency to CosmosDiagnostics
PartitionKey: Fixes null reference when using default(PartitionKey)
[v4] Client Encryption: Refactors code to external project
[Internal] Query: Adds code generator for CosmosNumbers for easy additions in the future.

@j82w j82w changed the title [Internal] Performance Improvement : Change ImmutableDictionary to IReadOnlyDictionary in Page Performance: Adds query improvement to avoid ImmutableDictionary Nov 8, 2021
@github-actions github-actions bot dismissed stale reviews from themself November 8, 2021 20:01

All good!

@sourabh1007 sourabh1007 force-pushed the users/sourabhjain/queryperffix1 branch from 79ffee3 to 794d4a7 Compare November 9, 2021 15:53
@j82w j82w merged commit b1fba88 into master Nov 9, 2021
@j82w j82w deleted the users/sourabhjain/queryperffix1 branch November 9, 2021 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CPU hotpath originating in CosmosQueryClientCore.GetCosmosElementResponse
4 participants