{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/2376","repository_url":"https://api.github.com/repos/aspnet/KestrelHttpServer","labels_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/2376/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/2376/comments","events_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/2376/events","html_url":"https://github.com/aspnet/KestrelHttpServer/pull/2376","id":304267508,"number":2376,"title":"Reduce Sockets mainloop Send/Receive statemachine size","user":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars1.githubusercontent.com/u/1142958?v=4","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,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-03-12T07:41:00Z","updated_at":"2018-03-13T15:54:53Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/aspnet/KestrelHttpServer/pulls/2376","html_url":"https://github.com/aspnet/KestrelHttpServer/pull/2376","diff_url":"https://github.com/aspnet/KestrelHttpServer/pull/2376.diff","patch_url":"https://github.com/aspnet/KestrelHttpServer/pull/2376.patch"},"body":"Removed from sending statemachine struct 16+16+16+16+8+8 = 80 bytes (5 object refs)\r\nAdded to sending statemachine struct 16+8 = 24 bytes (1 object ref)\r\n\r\nSo 56 byte reduction overall and 4 object refs (slower copies) removed.\r\n\r\nSimilar to https://github.com/aspnet/KestrelHttpServer/pull/2313\r\n\r\n\r\n### Before\r\n\r\nDoSend.MoveNext is **4 `.try`s deep** in il\r\n\r\n![image](https://user-images.githubusercontent.com/1142958/37270756-624540da-25a6-11e8-8524-f39d7d3bb1ce.png)\r\n\r\n### After\r\n\r\nProcessSends.MoveNext is **1 `.try`s deep** in il\r\n\r\n\r\nRemoved (larger due to padding/alignment): \r\n* `ReadResult { ReadOnlySequence { 2 x SequencePosition { object, int } }, bool }`\r\n* `ReadOnlySequence { 2 x SequencePosition { object, int } }`\r\n* `Exception`\r\n\r\nAdded\r\n* `SequencePosition { object, int }`\r\n* `bool`\r\n\r\n![image](https://user-images.githubusercontent.com/1142958/37273984-be2e7aaa-25b1-11e8-8729-b3a09480dbdf.png)\r\n"},"comment":{"url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/comments/372716021","html_url":"https://github.com/aspnet/KestrelHttpServer/pull/2376#issuecomment-372716021","issue_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/2376","id":372716021,"user":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars1.githubusercontent.com/u/1142958?v=4","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":"2018-03-13T15:54:53Z","updated_at":"2018-03-13T15:54:53Z","author_association":"CONTRIBUTOR","body":"It also trims the Send MoveNext from 576 il to 380 il and drops 3 `.try` blocks, 4 `catch`, 1 `filter` and 2 `finally`\r\n\r\n> Any idea how this 56 byte async state machine reduction affects the techempower benchmarks?\r\n\r\nAlas I am between locations atm, is there a magic incantation you can run? (for sockets)"}}
{"actor":{"display_login":"benaadams"}}