This repository was archived by the owner on Nov 20, 2018. It is now read-only.
This repository was archived by the owner on Nov 20, 2018. It is now read-only.
ResponseCookies.Append()
allocates lots, big lots #561
Closed
Description
Despite using StringValues
s, ResponseCookies.Append()
is very allocation-heavy. Even just reusing the StringBuilder
created in SetCookieHeaderValue.ToString()
would be a significant improvement.
For example, running a scenario that adds an Antiforgery token to every response (~156 characters in the token in this case) allocates almost 1 KB extra per response. That's more than 2% of the allocations in this scenario.