{"action":"closed","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/4060","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/4060/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/4060/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/4060/events","html_url":"https://github.com/dotnet/corefx/issues/4060","id":112707593,"number":4060,"title":"[System.Net.NetworkInformation] Follow up on miscellaneous perf / style issues","user":{"login":"mellinoe","id":8918977,"avatar_url":"https://avatars.githubusercontent.com/u/8918977?v=3","gravatar_id":"","url":"https://api.github.com/users/mellinoe","html_url":"https://github.com/mellinoe","followers_url":"https://api.github.com/users/mellinoe/followers","following_url":"https://api.github.com/users/mellinoe/following{/other_user}","gists_url":"https://api.github.com/users/mellinoe/gists{/gist_id}","starred_url":"https://api.github.com/users/mellinoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mellinoe/subscriptions","organizations_url":"https://api.github.com/users/mellinoe/orgs","repos_url":"https://api.github.com/users/mellinoe/repos","events_url":"https://api.github.com/users/mellinoe/events{/privacy}","received_events_url":"https://api.github.com/users/mellinoe/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/corefx/labels/System.Net","name":"System.Net","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":{"login":"mellinoe","id":8918977,"avatar_url":"https://avatars.githubusercontent.com/u/8918977?v=3","gravatar_id":"","url":"https://api.github.com/users/mellinoe","html_url":"https://github.com/mellinoe","followers_url":"https://api.github.com/users/mellinoe/followers","following_url":"https://api.github.com/users/mellinoe/following{/other_user}","gists_url":"https://api.github.com/users/mellinoe/gists{/gist_id}","starred_url":"https://api.github.com/users/mellinoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mellinoe/subscriptions","organizations_url":"https://api.github.com/users/mellinoe/orgs","repos_url":"https://api.github.com/users/mellinoe/repos","events_url":"https://api.github.com/users/mellinoe/events{/privacy}","received_events_url":"https://api.github.com/users/mellinoe/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/6","html_url":"https://github.com/dotnet/corefx/milestones/1.0.0-rc2","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/6/labels","id":1365455,"number":6,"title":"1.0.0-rc2","description":"","creator":{"login":"joshfree","id":1302850,"avatar_url":"https://avatars.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":80,"closed_issues":37,"state":"open","created_at":"2015-10-20T04:29:15Z","updated_at":"2015-11-05T19:18:26Z","due_on":"2016-02-01T08:00:00Z","closed_at":null},"comments":2,"created_at":"2015-10-22T00:50:07Z","updated_at":"2015-11-05T19:18:26Z","closed_at":"2015-11-05T19:18:26Z","body":"- [x] There are a number of // PERF markers in the code\r\n- [x] @pgavlin suggested that, when collecting data using sysctl on OSX, we could try to use a stack-allocated buffer of some fixed size before falling back to heap allocation if the call fails. There are a number of instances of this in pal_networkstatistics.cpp.\r\n- [x] A number of properties on various types in the library can be lazily instantiated, assuming that doing so will not alter the resulting object that is created. I don't have an exhaustive list of all the properties that can be optimized this way. We should match the behavior of Windows here with regards to when the data is finalized for those properties.\r\n- [x] When parsing the Linux network files, we should probably use invariant string comparisons, rather than the default culture-aware.\r\n- [x] Address miscellaneous comments from the previous PR (https://github.com/dotnet/corefx/pull/4039)\r\n- [x] Move TcpState mapping from C# to native shim\r\n- [x] Consider bailing on sysctl calls if estimated buffer size isn't big enough. (Most code examples do this and I've never seen the estimated size be incorrect)."}}