-
Notifications
You must be signed in to change notification settings - Fork 494
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 Authorization Helper improvements #2000
Conversation
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.
Please follow the required format: "[Internal] Category: (Adds|Fixes|Refactors) Description"
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.
…azure-cosmos-dotnet-v3 into users/jawilley/perf/auth2
…azure-cosmos-dotnet-v3 into users/jawilley/perf/auth2
Please run it through with Vinod. |
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.
LGTM, just left a comment
Microsoft.Azure.Cosmos/src/Authorization/AuthorizationHelper.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Authorization/AuthorizationHelper.cs
Outdated
Show resolved
Hide resolved
Closing due to in-activity, pease feel free to re-open. |
Pull Request Template
Description
This optimizes the URL encoding by utilizing the fact that the string is always base64 encoded. This also reduces allocations by avoiding converting to a string, back to byte array, url encode the byte array then back to a string. It now takes the original byte array base64 encodes it then url encodes that without the string transformations.
Compares GenerateAuthorizationTokenWithHashCore with HttpUtility.Encode vs new GenerateUrlEncodedAuthorizationTokenWithHashCore
MasterKeyAuthorizationBenchmarks
Type of change
Please delete options that are not relevant.
Closing issues
To automatically close an issue: closes #IssueNumber