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: Request header improvement #2992

Closed
j82w opened this issue Jan 21, 2022 · 0 comments
Closed

Performance: Request header improvement #2992

j82w opened this issue Jan 21, 2022 · 0 comments
Milestone

Comments

@j82w
Copy link
Contributor

j82w commented Jan 21, 2022

The top 3 methods in the profile shows the header lookups. To avoid this overhead the INameValueCollection interface should add all the headers properties required by TransportSerialization BuildRequest. Then the TransportSerialization logic can be converted to directly reference the property and avoid the overhead of doing lookups by name for all the headers.

The headers are shared by multiple requests for strong and bounded consistency. It is not safe to iterate the headers as 1 thread might modify it while it's being iterated which results in an exception.

TransportSerialization code: https://msdata.visualstudio.com/_git/CosmosDB?path=/Product/Microsoft.Azure.Documents/SharedFiles/Rntbd2/TransportSerialization.cs&version=GBmaster&_a=contents
image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants