Skip to content
This repository was archived by the owner on Dec 19, 2018. It is now read-only.
This repository was archived by the owner on Dec 19, 2018. It is now read-only.

[Perf] HttpContextFactory should only wrap ReadOnly feature collections #310

@Tratcher

Description

@Tratcher

https://github.com/aspnet/Hosting/blob/dev/src/Microsoft.AspNet.Hosting/Builder/HttpContextFactory.cs#L14

IFeatureCollections can be marked as IsReadOnly or not. HttpContextFactory currently assumes they are all read only and wraps them in a mutable FeatureCollection. This has some perf overhead where it creates extra Dictionaries, etc, and is redundant if the server already provided a mutable collection.

Recommendation: Only wrap the given feature collection if is marked as IsReadOnly.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions