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

Consider removing slow String.format call in StorageSharedKeyCredential #24535

Closed
JonathanGiles opened this issue Oct 5, 2021 · 0 comments · Fixed by #24551
Closed

Consider removing slow String.format call in StorageSharedKeyCredential #24535

JonathanGiles opened this issue Oct 5, 2021 · 0 comments · Fixed by #24551
Assignees
Labels
Storage Storage Service (Queues, Blobs, Files)

Comments

@JonathanGiles
Copy link
Member

In StorageSharedKeyCredential.generateAuthorizationHeader, there is a call to String.format that appends an accountName and signature into the returned string. This takes between 1.4-4.2% of CPU time in some benchmarks, and is potentially redundant - could it be replaced with something such as return "SharedKey " + accountName + ":" + signature, to avoid the need to perform the slower String.format operation?

@JonathanGiles JonathanGiles added the Storage Storage Service (Queues, Blobs, Files) label Oct 5, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants