{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/comments/196072491","pull_request_review_id":129555404,"id":196072491,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjA3MjQ5MQ==","diff_hunk":"@@ -122,14 +122,13 @@ internal unsafe bool TransmitPackets(SafeCloseSocket socketHandle, IntPtr packet\n             return transmitPackets(socketHandle, packetArray, elementCount, sendSize, overlapped, flags);\n         }\n \n-        internal static IntPtr[] SocketListToFileDescriptorSet(IList socketList)\n+        internal static void SocketListToFileDescriptorSet(IList socketList, Span<IntPtr> fileDescriptorSet)\n         {\n             if (socketList == null || socketList.Count == 0)\n             {\n-                return null;\n+                return;\n             }\n \n-            IntPtr[] fileDescriptorSet = new IntPtr[socketList.Count + 1];\n             fileDescriptorSet[0] = (IntPtr)socketList.Count;\n             for (int current = 0; current < socketList.Count; current++)","path":"src/System.Net.Sockets/src/System/Net/Sockets/Socket.Windows.cs","position":15,"original_position":15,"commit_id":"5b5a7decf5dd5c23199de478cfc766f693bc7e8c","original_commit_id":"5b5a7decf5dd5c23199de478cfc766f693bc7e8c","user":{"login":"stephentoub","id":2642209,"node_id":"MDQ6VXNlcjI2NDIyMDk=","avatar_url":"https://avatars0.githubusercontent.com/u/2642209?v=4","gravatar_id":"","url":"https://api.github.com/users/stephentoub","html_url":"https://github.com/stephentoub","followers_url":"https://api.github.com/users/stephentoub/followers","following_url":"https://api.github.com/users/stephentoub/following{/other_user}","gists_url":"https://api.github.com/users/stephentoub/gists{/gist_id}","starred_url":"https://api.github.com/users/stephentoub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephentoub/subscriptions","organizations_url":"https://api.github.com/users/stephentoub/orgs","repos_url":"https://api.github.com/users/stephentoub/repos","events_url":"https://api.github.com/users/stephentoub/events{/privacy}","received_events_url":"https://api.github.com/users/stephentoub/received_events","type":"User","site_admin":false},"body":"`fileDescriptorSet` is now the same length as `socketList`, right?  If so, it'd be more efficient to use fileDescriptorSet.Length rather than `socketList.Count`, which is an interface call.  If we need to keep using `socketList.Count` for some reason, we should store it in a local first.","created_at":"2018-06-18T13:15:40Z","updated_at":"2018-06-18T13:15:40Z","html_url":"https://github.com/dotnet/corefx/pull/30485#discussion_r196072491","pull_request_url":"https://api.github.com/repos/dotnet/corefx/pulls/30485","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments/196072491"},"html":{"href":"https://github.com/dotnet/corefx/pull/30485#discussion_r196072491"},"pull_request":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/30485"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/30485","id":195498387,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1NDk4Mzg3","html_url":"https://github.com/dotnet/corefx/pull/30485","diff_url":"https://github.com/dotnet/corefx/pull/30485.diff","patch_url":"https://github.com/dotnet/corefx/pull/30485.patch","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/30485","number":30485,"state":"open","locked":false,"title":"Sockets on Windows: reduce array allocations during Select, Poll, Receive, Send","user":{"login":"mgravell","id":17328,"node_id":"MDQ6VXNlcjE3MzI4","avatar_url":"https://avatars3.githubusercontent.com/u/17328?v=4","gravatar_id":"","url":"https://api.github.com/users/mgravell","html_url":"https://github.com/mgravell","followers_url":"https://api.github.com/users/mgravell/followers","following_url":"https://api.github.com/users/mgravell/following{/other_user}","gists_url":"https://api.github.com/users/mgravell/gists{/gist_id}","starred_url":"https://api.github.com/users/mgravell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgravell/subscriptions","organizations_url":"https://api.github.com/users/mgravell/orgs","repos_url":"https://api.github.com/users/mgravell/repos","events_url":"https://api.github.com/users/mgravell/events{/privacy}","received_events_url":"https://api.github.com/users/mgravell/received_events","type":"User","site_admin":false},"body":"Addresses #30475\r\n\r\nPasses all tests locally.\r\n\r\nUses arbitrary cutoff of 80 (inherited from unix) to choose between `stackalloc` and array allocation. There is some discussion to be had, perhaps, about the decision whether to use `ref Foo` or `Foo*` (via `fixed`) in the P/Invoke API - /cc @jkotas perhaps.","created_at":"2018-06-18T11:42:11Z","updated_at":"2018-06-18T13:15:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"25234df17b2374178884b3f0afd9b411ae615ca4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/corefx/pulls/30485/commits","review_comments_url":"https://api.github.com/repos/dotnet/corefx/pulls/30485/comments","review_comment_url":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/30485/comments","statuses_url":"https://api.github.com/repos/dotnet/corefx/statuses/5b5a7decf5dd5c23199de478cfc766f693bc7e8c","head":{"label":"mgravell:socket-select-zero-alloc","ref":"socket-select-zero-alloc","sha":"5b5a7decf5dd5c23199de478cfc766f693bc7e8c","user":{"login":"mgravell","id":17328,"node_id":"MDQ6VXNlcjE3MzI4","avatar_url":"https://avatars3.githubusercontent.com/u/17328?v=4","gravatar_id":"","url":"https://api.github.com/users/mgravell","html_url":"https://github.com/mgravell","followers_url":"https://api.github.com/users/mgravell/followers","following_url":"https://api.github.com/users/mgravell/following{/other_user}","gists_url":"https://api.github.com/users/mgravell/gists{/gist_id}","starred_url":"https://api.github.com/users/mgravell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgravell/subscriptions","organizations_url":"https://api.github.com/users/mgravell/orgs","repos_url":"https://api.github.com/users/mgravell/repos","events_url":"https://api.github.com/users/mgravell/events{/privacy}","received_events_url":"https://api.github.com/users/mgravell/received_events","type":"User","site_admin":false},"repo":{"id":47005485,"node_id":"MDEwOlJlcG9zaXRvcnk0NzAwNTQ4NQ==","name":"corefx","full_name":"mgravell/corefx","owner":{"login":"mgravell","id":17328,"node_id":"MDQ6VXNlcjE3MzI4","avatar_url":"https://avatars3.githubusercontent.com/u/17328?v=4","gravatar_id":"","url":"https://api.github.com/users/mgravell","html_url":"https://github.com/mgravell","followers_url":"https://api.github.com/users/mgravell/followers","following_url":"https://api.github.com/users/mgravell/following{/other_user}","gists_url":"https://api.github.com/users/mgravell/gists{/gist_id}","starred_url":"https://api.github.com/users/mgravell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgravell/subscriptions","organizations_url":"https://api.github.com/users/mgravell/orgs","repos_url":"https://api.github.com/users/mgravell/repos","events_url":"https://api.github.com/users/mgravell/events{/privacy}","received_events_url":"https://api.github.com/users/mgravell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mgravell/corefx","description":"This repo contains the .NET Core foundational libraries, called CoreFX. It includes classes for collections, file systems, console, XML, async and many others.","fork":true,"url":"https://api.github.com/repos/mgravell/corefx","forks_url":"https://api.github.com/repos/mgravell/corefx/forks","keys_url":"https://api.github.com/repos/mgravell/corefx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mgravell/corefx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mgravell/corefx/teams","hooks_url":"https://api.github.com/repos/mgravell/corefx/hooks","issue_events_url":"https://api.github.com/repos/mgravell/corefx/issues/events{/number}","events_url":"https://api.github.com/repos/mgravell/corefx/events","assignees_url":"https://api.github.com/repos/mgravell/corefx/assignees{/user}","branches_url":"https://api.github.com/repos/mgravell/corefx/branches{/branch}","tags_url":"https://api.github.com/repos/mgravell/corefx/tags","blobs_url":"https://api.github.com/repos/mgravell/corefx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mgravell/corefx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mgravell/corefx/git/refs{/sha}","trees_url":"https://api.github.com/repos/mgravell/corefx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mgravell/corefx/statuses/{sha}","languages_url":"https://api.github.com/repos/mgravell/corefx/languages","stargazers_url":"https://api.github.com/repos/mgravell/corefx/stargazers","contributors_url":"https://api.github.com/repos/mgravell/corefx/contributors","subscribers_url":"https://api.github.com/repos/mgravell/corefx/subscribers","subscription_url":"https://api.github.com/repos/mgravell/corefx/subscription","commits_url":"https://api.github.com/repos/mgravell/corefx/commits{/sha}","git_commits_url":"https://api.github.com/repos/mgravell/corefx/git/commits{/sha}","comments_url":"https://api.github.com/repos/mgravell/corefx/comments{/number}","issue_comment_url":"https://api.github.com/repos/mgravell/corefx/issues/comments{/number}","contents_url":"https://api.github.com/repos/mgravell/corefx/contents/{+path}","compare_url":"https://api.github.com/repos/mgravell/corefx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mgravell/corefx/merges","archive_url":"https://api.github.com/repos/mgravell/corefx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mgravell/corefx/downloads","issues_url":"https://api.github.com/repos/mgravell/corefx/issues{/number}","pulls_url":"https://api.github.com/repos/mgravell/corefx/pulls{/number}","milestones_url":"https://api.github.com/repos/mgravell/corefx/milestones{/number}","notifications_url":"https://api.github.com/repos/mgravell/corefx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mgravell/corefx/labels{/name}","releases_url":"https://api.github.com/repos/mgravell/corefx/releases{/id}","deployments_url":"https://api.github.com/repos/mgravell/corefx/deployments","created_at":"2015-11-28T01:22:47Z","updated_at":"2018-06-17T20:21:55Z","pushed_at":"2018-06-18T12:21:32Z","git_url":"git://github.com/mgravell/corefx.git","ssh_url":"git@github.com:mgravell/corefx.git","clone_url":"https://github.com/mgravell/corefx.git","svn_url":"https://github.com/mgravell/corefx","homepage":"http://dotnet.github.io/","size":174168,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"7303e22416dbcf4c27940efa90770d183f9162dc","user":{"login":"dotnet","id":9141961,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkxNDE5NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":26295345,"node_id":"MDEwOlJlcG9zaXRvcnkyNjI5NTM0NQ==","name":"corefx","full_name":"dotnet/corefx","owner":{"login":"dotnet","id":9141961,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkxNDE5NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/corefx","description":"This repo contains the .NET Core foundational libraries, called CoreFX. It includes classes for collections, file systems, console, XML, async and many others. We welcome contributions.","fork":false,"url":"https://api.github.com/repos/dotnet/corefx","forks_url":"https://api.github.com/repos/dotnet/corefx/forks","keys_url":"https://api.github.com/repos/dotnet/corefx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/corefx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/corefx/teams","hooks_url":"https://api.github.com/repos/dotnet/corefx/hooks","issue_events_url":"https://api.github.com/repos/dotnet/corefx/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/corefx/events","assignees_url":"https://api.github.com/repos/dotnet/corefx/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/corefx/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/corefx/tags","blobs_url":"https://api.github.com/repos/dotnet/corefx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/corefx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/corefx/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/corefx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/corefx/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/corefx/languages","stargazers_url":"https://api.github.com/repos/dotnet/corefx/stargazers","contributors_url":"https://api.github.com/repos/dotnet/corefx/contributors","subscribers_url":"https://api.github.com/repos/dotnet/corefx/subscribers","subscription_url":"https://api.github.com/repos/dotnet/corefx/subscription","commits_url":"https://api.github.com/repos/dotnet/corefx/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/corefx/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/corefx/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/corefx/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/corefx/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/corefx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/corefx/merges","archive_url":"https://api.github.com/repos/dotnet/corefx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/corefx/downloads","issues_url":"https://api.github.com/repos/dotnet/corefx/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/corefx/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/corefx/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/corefx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/corefx/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/corefx/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/corefx/deployments","created_at":"2014-11-06T23:42:48Z","updated_at":"2018-06-18T12:01:37Z","pushed_at":"2018-06-18T13:05:02Z","git_url":"git://github.com/dotnet/corefx.git","ssh_url":"git@github.com:dotnet/corefx.git","clone_url":"https://github.com/dotnet/corefx.git","svn_url":"https://github.com/dotnet/corefx","homepage":"https://github.com/dotnet/core","size":180436,"stargazers_count":14177,"watchers_count":14177,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4112,"mirror_url":null,"archived":false,"open_issues_count":2342,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":4112,"open_issues":2342,"watchers":14177,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/30485"},"html":{"href":"https://github.com/dotnet/corefx/pull/30485"},"issue":{"href":"https://api.github.com/repos/dotnet/corefx/issues/30485"},"comments":{"href":"https://api.github.com/repos/dotnet/corefx/issues/30485/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/30485/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/30485/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/corefx/statuses/5b5a7decf5dd5c23199de478cfc766f693bc7e8c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"stephentoub"}}