{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/7413","repository_url":"https://api.github.com/repos/dotnet/coreclr","labels_url":"https://api.github.com/repos/dotnet/coreclr/issues/7413/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/7413/comments","events_url":"https://api.github.com/repos/dotnet/coreclr/issues/7413/events","html_url":"https://github.com/dotnet/coreclr/issues/7413","id":180005655,"number":7413,"title":"Socket.Select / Read and Socket.Handle","user":{"login":"samirparekh","id":22518839,"avatar_url":"https://avatars3.githubusercontent.com/u/22518839?v=3","gravatar_id":"","url":"https://api.github.com/users/samirparekh","html_url":"https://github.com/samirparekh","followers_url":"https://api.github.com/users/samirparekh/followers","following_url":"https://api.github.com/users/samirparekh/following{/other_user}","gists_url":"https://api.github.com/users/samirparekh/gists{/gist_id}","starred_url":"https://api.github.com/users/samirparekh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samirparekh/subscriptions","organizations_url":"https://api.github.com/users/samirparekh/orgs","repos_url":"https://api.github.com/users/samirparekh/repos","events_url":"https://api.github.com/users/samirparekh/events{/privacy}","received_events_url":"https://api.github.com/users/samirparekh/received_events","type":"User","site_admin":false},"labels":[{"id":484962156,"url":"https://api.github.com/repos/dotnet/coreclr/labels/area-Meta","name":"area-Meta","color":"d4c5f9","default":false},{"id":191917125,"url":"https://api.github.com/repos/dotnet/coreclr/labels/tenet-performance","name":"tenet-performance","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/dotnet/coreclr/milestones/5","html_url":"https://github.com/dotnet/coreclr/milestone/5","labels_url":"https://api.github.com/repos/dotnet/coreclr/milestones/5/labels","id":1328081,"number":5,"title":"Future","description":"Milestone tracking the issues that have been triaged for after 1.0.0-rtm","creator":{"login":"joshfree","id":1302850,"avatar_url":"https://avatars2.githubusercontent.com/u/1302850?v=3","gravatar_id":"","url":"https://api.github.com/users/joshfree","html_url":"https://github.com/joshfree","followers_url":"https://api.github.com/users/joshfree/followers","following_url":"https://api.github.com/users/joshfree/following{/other_user}","gists_url":"https://api.github.com/users/joshfree/gists{/gist_id}","starred_url":"https://api.github.com/users/joshfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshfree/subscriptions","organizations_url":"https://api.github.com/users/joshfree/orgs","repos_url":"https://api.github.com/users/joshfree/repos","events_url":"https://api.github.com/users/joshfree/events{/privacy}","received_events_url":"https://api.github.com/users/joshfree/received_events","type":"User","site_admin":false},"open_issues":745,"closed_issues":450,"state":"open","created_at":"2015-09-29T00:26:07Z","updated_at":"2017-03-05T04:02:08Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-09-29T10:02:47Z","updated_at":"2017-03-05T12:37:50Z","closed_at":null,"body":"Hi, we have an application which we intend to port to .NETCore. This application is a latency sensitive application and it requires to monitor >100 sockets for incoming (high frequency) financial market data.\n\nI have gone throught the implementation of Socket.Select for windows and Linux (from the available source code).\n\nIt seems like for Linux the framework allocates a stack based pointer list (in case when the provided socket list length is < 80) else on the heap. Surprising enough the same approach could have benefited wider group of windows users.\n\nMoreover in my case where i can not go for allocating an array of >100 sockets , in my previous implementation I had a pre-allocated array/list of socket pointers/handles and reused it through the process lifecycle(thus eleminating the performance penalty imposed by GC in case of constantly re-allocating IntPtr arrays).\n\nIt seems like in the current code base it is no longer possible to get an IntPtr / handle to a socket which makes the above code optimization impossible.\n\nMay I request you (in the interest of broader community) to rethink the various scenarios and advice the possible cource of action.\n\nThanks\n"},"comment":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/comments/284225067","html_url":"https://github.com/dotnet/coreclr/issues/7413#issuecomment-284225067","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/7413","id":284225067,"user":{"login":"stephentoub","id":2642209,"avatar_url":"https://avatars3.githubusercontent.com/u/2642209?v=3","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},"created_at":"2017-03-05T12:37:50Z","updated_at":"2017-03-05T12:37:50Z","body":"This issue should really be in CoreFx.\r\n\r\n> It seems like for Linux the framework allocates a stack based pointer list (in case when the provided socket list length is < 80) else on the heap. Surprising enough the same approach could have benefited wider group of windows users.\r\n\r\nYes, that should be doable for Windows as well.\r\n\r\n> It seems like in the current code base it is no longer possible to get an IntPtr / handle to a socket which makes the above code optimization impossible.\r\n\r\nSocket.Handle has been exposed.  It's not available in .NET Core 1.x, but is in .NET Core 2.0."}}
{"actor":{"display_login":"stephentoub"}}