-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
area-System.Net.HttpenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionstenet-performancePerformance related issuePerformance related issue
Milestone
Description
I have a micro-benchmark that simulates a gRPC call. Instead of calling the underlying SocketsHttpHandler, a mock handler returns a manually created HttpResponseMessage.
A lot of the allocations in this scenario are related to HTTP headers (obviously they would be less significant in a real world HTTP call).
A request/response has many header collections, and most of the time these header collections are going to be small.
- HttpRequestMessage.Headers
- HttpRequestMessage.Content.Headers
- HttpResponseMessage.Headers
- HttpResponseMessage.Trailers
- HttpResponseMessage.Content.Headers
At the moment an internal dictionary is used in each. This seems unnecessary given their typically small size. Can the internal storage of headers be optimized?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-System.Net.HttpenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionstenet-performancePerformance related issuePerformance related issue
