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
{{ message }}
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.
There are several cases where low level APIs produce a basic IDictionary or similar, but then we wrap it in a IFoo : IDictionary to make it more user friendly. These wrappers cause lots of extra allocations on each request, resulting in lots of GCs. The main culperates are request headers, response headers, query, form, and cookies.
Headers we can fix by moving IHeaderDictionary into the Features package, use it for IHttpRequestFeature.Headers & IHttpResponseFeature.Headers, and have the servers implement it directly. This is a little more work for the servers, but it removes a wrapper layer. We'll still need the old wrapper implementation for tests though.
Query, Form, and Cookies we can address by having the callers create a collection that implements IDictionary and their own interface (IQueryCollection, IFormCollection, and ICookiesCollection), and having the parser add everything to the provided IDictionary.
The text was updated successfully, but these errors were encountered:
There are several cases where low level APIs produce a basic IDictionary or similar, but then we wrap it in a IFoo : IDictionary to make it more user friendly. These wrappers cause lots of extra allocations on each request, resulting in lots of GCs. The main culperates are request headers, response headers, query, form, and cookies.
Headers we can fix by moving IHeaderDictionary into the Features package, use it for IHttpRequestFeature.Headers & IHttpResponseFeature.Headers, and have the servers implement it directly. This is a little more work for the servers, but it removes a wrapper layer. We'll still need the old wrapper implementation for tests though.
Query, Form, and Cookies we can address by having the callers create a collection that implements IDictionary and their own interface (IQueryCollection, IFormCollection, and ICookiesCollection), and having the parser add everything to the provided IDictionary.
The text was updated successfully, but these errors were encountered: