{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/407","labels_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/407/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/407/comments","events_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/407/events","html_url":"https://github.com/aspnet/KestrelHttpServer/issues/407","id":117913836,"number":407,"title":"CreateLinkedTokenSource is high alloc","user":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars.githubusercontent.com/u/1142958?v=3","gravatar_id":"","url":"https://api.github.com/users/benaadams","html_url":"https://github.com/benaadams","followers_url":"https://api.github.com/users/benaadams/followers","following_url":"https://api.github.com/users/benaadams/following{/other_user}","gists_url":"https://api.github.com/users/benaadams/gists{/gist_id}","starred_url":"https://api.github.com/users/benaadams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benaadams/subscriptions","organizations_url":"https://api.github.com/users/benaadams/orgs","repos_url":"https://api.github.com/users/benaadams/repos","events_url":"https://api.github.com/users/benaadams/events{/privacy}","received_events_url":"https://api.github.com/users/benaadams/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-11-19T21:41:06Z","updated_at":"2015-11-23T15:29:11Z","closed_at":null,"body":"Using `CreateLinkedTokenSource` allocates more memory than the HttpContext! O_o\r\n\r\n![Token source](http://aoa.blob.core.windows.net/aspnet/tokensource.png)\r\n\r\n`_requestAbortCts = CancellationTokenSource.CreateLinkedTokenSource(_disconnectCts.Token);`\r\n\r\nhttps://github.com/aspnet/KestrelHttpServer/blob/dev/src/Microsoft.AspNet.Server.Kestrel/Http/Frame.cs#L251\r\n\r\n/cc @davidfowl @halter73 "},"comment":{"url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/comments/158969089","html_url":"https://github.com/aspnet/KestrelHttpServer/issues/407#issuecomment-158969089","issue_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/407","id":158969089,"user":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars.githubusercontent.com/u/1142958?v=3","gravatar_id":"","url":"https://api.github.com/users/benaadams","html_url":"https://github.com/benaadams","followers_url":"https://api.github.com/users/benaadams/followers","following_url":"https://api.github.com/users/benaadams/following{/other_user}","gists_url":"https://api.github.com/users/benaadams/gists{/gist_id}","starred_url":"https://api.github.com/users/benaadams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benaadams/subscriptions","organizations_url":"https://api.github.com/users/benaadams/orgs","repos_url":"https://api.github.com/users/benaadams/repos","events_url":"https://api.github.com/users/benaadams/events{/privacy}","received_events_url":"https://api.github.com/users/benaadams/received_events","type":"User","site_admin":false},"created_at":"2015-11-23T15:29:11Z","updated_at":"2015-11-23T15:29:11Z","body":"The CT is fine its the CTS that is expensive (well only 72 bytes.., now down to 64 bytes with some changes in coreclr). The pay for play means if nothing calls `Register` on the CT then the cost is not incurred; the cost itself only becomes an issue above 500k requests a second though; so I would worry too much :)"}}