Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessing the cookie collection allocates *alot* #10030

Closed
davidfowl opened this issue May 7, 2019 · 0 comments
Closed

Accessing the cookie collection allocates *alot* #10030

davidfowl opened this issue May 7, 2019 · 0 comments
Assignees
Labels
affected-very-few This issue impacts very few customers area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions Perf severity-nice-to-have This label is used by an internal tool task
Milestone

Comments

@davidfowl
Copy link
Member

using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

namespace WebApplication254
{
    public class Startup
    {
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.Run(context =>
            {
                var cookie = context.Request.Cookies[".AspNetCore.Cookies"];

                return context.Response.WriteAsync($"Hello World {cookie}");
            });
        }
    }
}

Most of these allocations look unnecessary. In the end, we need a collection that has cookies split into name value pairs.

image

@analogrelay analogrelay added this to the Backlog milestone May 8, 2019
@pranavkm pranavkm removed the fowler label Jun 15, 2020
@jkotalik jkotalik added affected-very-few This issue impacts very few customers severity-nice-to-have This label is used by an internal tool task labels Nov 13, 2020 — with ASP.NET Core Issue Ranking
@jkotalik jkotalik self-assigned this Mar 25, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Apr 26, 2021
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affected-very-few This issue impacts very few customers area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions Perf severity-nice-to-have This label is used by an internal tool task
Projects
None yet
Development

No branches or pull requests

6 participants