Skip to content

Optimize HttpRequestOptions storage #88750

@antonfirsov

Description

@antonfirsov

Currently, HttpRequestOptions is backed by a Dictionary<string, object?> that contains only a few items in the vast majority of the use cases which is sub-optimal. Instead we could, back it by an array, or even embed a few key-value pairs, and allocate a dictionary/array only if the embedded limit is exceeded.

This would reduce the memory footprint of Metrics enrichment and also improve many other customer scenarios (eg. in dotnet/extensions) which rely on HttpRequestOptions.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions