New FeatureCollection constructor for initialCapacity #31249
Labels
api-approved
API was approved in API review, it can be implemented
area-networking
Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
enhancement
This issue represents an ask for new feature or an enhancement to an existing one
good first issue
Good for newcomers.
help wanted
Up for grabs. We would accept a PR to help resolve this issue
Milestone
Background and Motivation
Some background can be found here, dictionary resizes were fairly visible in traces #31240
Proposed API
namespace Microsoft.AspNetCore.Http.Features { public class FeatureCollection { + public FeatureCollection(int initialCapacity); } }
Usage Examples
Initial place this will be used is
The initial capacity of 10 is just an example, say 5 or 7 would also be fine for me.
Alternative Designs
This could also be handled through an internal constructor.
Risks
It can be viewed as api bloat if it provides minimal overall value.
The text was updated successfully, but these errors were encountered: