You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today we use IApiCallDetails as a bucket of diagnostic and HTTP metadata about a request/response. While this is useful, it also causes allocations for each request and mixes functionality.
It might be useful to split this such that IApiCallDetails becomes lighter and focused on HTTP specific fields such as status code, URI, mime-type etc. These would be things we likely want to store per response. If small enough, this may also benefit from becoming a struct in the default implementation.
We could then move diagnostic fields into their own type, IApiDiagnosticDetails such that we can have an opt-out mechanism that avoids the allocation of the instance at all. Additionally, it separates the diagnostics properties from the more commonly used HTTP-related data.
We'd need to do some profiling to compare the effect of such a split as the additional field increasing the size of ITransportResponse.
The text was updated successfully, but these errors were encountered:
Today we use
IApiCallDetails
as a bucket of diagnostic and HTTP metadata about a request/response. While this is useful, it also causes allocations for each request and mixes functionality.It might be useful to split this such that
IApiCallDetails
becomes lighter and focused on HTTP specific fields such as status code, URI, mime-type etc. These would be things we likely want to store per response. If small enough, this may also benefit from becoming a struct in the default implementation.We could then move diagnostic fields into their own type,
IApiDiagnosticDetails
such that we can have an opt-out mechanism that avoids the allocation of the instance at all. Additionally, it separates the diagnostics properties from the more commonly used HTTP-related data.We'd need to do some profiling to compare the effect of such a split as the additional field increasing the size of
ITransportResponse
.The text was updated successfully, but these errors were encountered: