{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/comments/177877369","pull_request_review_id":107834526,"id":177877369,"diff_hunk":"@@ -153,6 +153,9 @@ private struct bucket\n         private IEqualityComparer _keycomparer;\n         private Object _syncRoot;\n \n+        private static ConditionalWeakTable<object, SerializationInfo> s_serializationInfoTable;\n+        private static ConditionalWeakTable<object, SerializationInfo> SerializationInfoTable => LazyInitializer.EnsureInitialized(ref s_serializationInfoTable);","path":"src/System.Runtime.Extensions/src/System/Collections/Hashtable.cs","position":5,"original_position":5,"commit_id":"b7c32d26325e52cf7426144f65a93561adf9a129","original_commit_id":"af85154aefcdde35a1e51fd3d205ff387cf31eeb","user":{"login":"jkotas","id":6668460,"avatar_url":"https://avatars2.githubusercontent.com/u/6668460?v=4","gravatar_id":"","url":"https://api.github.com/users/jkotas","html_url":"https://github.com/jkotas","followers_url":"https://api.github.com/users/jkotas/followers","following_url":"https://api.github.com/users/jkotas/following{/other_user}","gists_url":"https://api.github.com/users/jkotas/gists{/gist_id}","starred_url":"https://api.github.com/users/jkotas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkotas/subscriptions","organizations_url":"https://api.github.com/users/jkotas/orgs","repos_url":"https://api.github.com/users/jkotas/repos","events_url":"https://api.github.com/users/jkotas/events{/privacy}","received_events_url":"https://api.github.com/users/jkotas/received_events","type":"User","site_admin":false},"body":"I do not have preference.\r\n\r\n`LazyInitializer.EnsureInitialized` is convenience helper. It looks nicer, but it results into bigger slower code.","created_at":"2018-03-28T20:19:31Z","updated_at":"2018-03-28T20:19:31Z","html_url":"https://github.com/dotnet/corefx/pull/25509#discussion_r177877369","pull_request_url":"https://api.github.com/repos/dotnet/corefx/pulls/25509","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments/177877369"},"html":{"href":"https://github.com/dotnet/corefx/pull/25509#discussion_r177877369"},"pull_request":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/25509"}},"in_reply_to_id":177846156},"pull_request":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/25509","id":154692651,"html_url":"https://github.com/dotnet/corefx/pull/25509","diff_url":"https://github.com/dotnet/corefx/pull/25509.diff","patch_url":"https://github.com/dotnet/corefx/pull/25509.patch","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/25509","number":25509,"state":"open","locked":false,"title":"Reuse HashHelpers for BinaryFormatter objectholder hashes","user":{"login":"ViktorHofer","id":7412651,"avatar_url":"https://avatars1.githubusercontent.com/u/7412651?v=4","gravatar_id":"","url":"https://api.github.com/users/ViktorHofer","html_url":"https://github.com/ViktorHofer","followers_url":"https://api.github.com/users/ViktorHofer/followers","following_url":"https://api.github.com/users/ViktorHofer/following{/other_user}","gists_url":"https://api.github.com/users/ViktorHofer/gists{/gist_id}","starred_url":"https://api.github.com/users/ViktorHofer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ViktorHofer/subscriptions","organizations_url":"https://api.github.com/users/ViktorHofer/orgs","repos_url":"https://api.github.com/users/ViktorHofer/repos","events_url":"https://api.github.com/users/ViktorHofer/events{/privacy}","received_events_url":"https://api.github.com/users/ViktorHofer/received_events","type":"User","site_admin":false},"body":"Fixes https://github.com/dotnet/corefx/issues/25533\r\nFixes https://github.com/dotnet/corefx/issues/24902\r\n\r\nWith https://github.com/dotnet/corefx/pull/17949 we increased the MaxArrazSize of ObjectHolders. Because of that change our largest prime number 6584983 can now be smaller than the max size of an array. By @danmosemsft suggestion I'm reusing the HashHelpers utility class to utilize larger pre-computed prime numbers and remove the logic for calculating the next optimal prime number.\r\nThis also changes the start prime number size as before it was 5 and now it is 3. When I'm off plane I will add benchmarks with performance numbers. A quick test didn't show any noticeable performance regressions.\r\n\r\n@Alois-xx I'm marking issue #24902 as fixed. As @stephentoub already mentioned we brought back BinaryFormatter for a smoother transition from .NET Framework to .NET Core and don't intend to optimize it further. If you want to, you can work by yourself on changing the data structure to remove the necessity of the pre-computed prime numbers and therefore the virtual limit. That would require extensive tests to be confident that we don't break or regress existing code.\r\n\r\ncc @joperezr ","created_at":"2017-11-26T19:19:40Z","updated_at":"2018-03-28T20:19:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3ec6e4974b72bc4456cf518e8b2fe273510e7cf7","assignee":{"login":"ViktorHofer","id":7412651,"avatar_url":"https://avatars1.githubusercontent.com/u/7412651?v=4","gravatar_id":"","url":"https://api.github.com/users/ViktorHofer","html_url":"https://github.com/ViktorHofer","followers_url":"https://api.github.com/users/ViktorHofer/followers","following_url":"https://api.github.com/users/ViktorHofer/following{/other_user}","gists_url":"https://api.github.com/users/ViktorHofer/gists{/gist_id}","starred_url":"https://api.github.com/users/ViktorHofer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ViktorHofer/subscriptions","organizations_url":"https://api.github.com/users/ViktorHofer/orgs","repos_url":"https://api.github.com/users/ViktorHofer/repos","events_url":"https://api.github.com/users/ViktorHofer/events{/privacy}","received_events_url":"https://api.github.com/users/ViktorHofer/received_events","type":"User","site_admin":false},"assignees":[{"login":"ViktorHofer","id":7412651,"avatar_url":"https://avatars1.githubusercontent.com/u/7412651?v=4","gravatar_id":"","url":"https://api.github.com/users/ViktorHofer","html_url":"https://github.com/ViktorHofer","followers_url":"https://api.github.com/users/ViktorHofer/followers","following_url":"https://api.github.com/users/ViktorHofer/following{/other_user}","gists_url":"https://api.github.com/users/ViktorHofer/gists{/gist_id}","starred_url":"https://api.github.com/users/ViktorHofer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ViktorHofer/subscriptions","organizations_url":"https://api.github.com/users/ViktorHofer/orgs","repos_url":"https://api.github.com/users/ViktorHofer/repos","events_url":"https://api.github.com/users/ViktorHofer/events{/privacy}","received_events_url":"https://api.github.com/users/ViktorHofer/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":179105931,"url":"https://api.github.com/repos/dotnet/corefx/labels/area-System.Runtime.Extensions","name":"area-System.Runtime.Extensions","color":"d4c5f9","default":false}],"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/12","html_url":"https://github.com/dotnet/corefx/milestone/12","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/12/labels","id":2323293,"number":12,"title":"2.1.0","description":".NET Core 2.1, next major release. See [official release dates](https://github.com/dotnet/core/blob/master/roadmap.md) for details.","creator":{"login":"karelz","id":5776068,"avatar_url":"https://avatars2.githubusercontent.com/u/5776068?v=4","gravatar_id":"","url":"https://api.github.com/users/karelz","html_url":"https://github.com/karelz","followers_url":"https://api.github.com/users/karelz/followers","following_url":"https://api.github.com/users/karelz/following{/other_user}","gists_url":"https://api.github.com/users/karelz/gists{/gist_id}","starred_url":"https://api.github.com/users/karelz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karelz/subscriptions","organizations_url":"https://api.github.com/users/karelz/orgs","repos_url":"https://api.github.com/users/karelz/repos","events_url":"https://api.github.com/users/karelz/events{/privacy}","received_events_url":"https://api.github.com/users/karelz/received_events","type":"User","site_admin":false},"open_issues":84,"closed_issues":6528,"state":"open","created_at":"2017-02-15T02:14:11Z","updated_at":"2018-03-28T19:55:47Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/dotnet/corefx/pulls/25509/commits","review_comments_url":"https://api.github.com/repos/dotnet/corefx/pulls/25509/comments","review_comment_url":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/25509/comments","statuses_url":"https://api.github.com/repos/dotnet/corefx/statuses/b7c32d26325e52cf7426144f65a93561adf9a129","head":{"label":"ViktorHofer:SerializationHolderHash","ref":"SerializationHolderHash","sha":"b7c32d26325e52cf7426144f65a93561adf9a129","user":{"login":"ViktorHofer","id":7412651,"avatar_url":"https://avatars1.githubusercontent.com/u/7412651?v=4","gravatar_id":"","url":"https://api.github.com/users/ViktorHofer","html_url":"https://github.com/ViktorHofer","followers_url":"https://api.github.com/users/ViktorHofer/followers","following_url":"https://api.github.com/users/ViktorHofer/following{/other_user}","gists_url":"https://api.github.com/users/ViktorHofer/gists{/gist_id}","starred_url":"https://api.github.com/users/ViktorHofer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ViktorHofer/subscriptions","organizations_url":"https://api.github.com/users/ViktorHofer/orgs","repos_url":"https://api.github.com/users/ViktorHofer/repos","events_url":"https://api.github.com/users/ViktorHofer/events{/privacy}","received_events_url":"https://api.github.com/users/ViktorHofer/received_events","type":"User","site_admin":false},"repo":{"id":85503956,"name":"corefx","full_name":"ViktorHofer/corefx","owner":{"login":"ViktorHofer","id":7412651,"avatar_url":"https://avatars1.githubusercontent.com/u/7412651?v=4","gravatar_id":"","url":"https://api.github.com/users/ViktorHofer","html_url":"https://github.com/ViktorHofer","followers_url":"https://api.github.com/users/ViktorHofer/followers","following_url":"https://api.github.com/users/ViktorHofer/following{/other_user}","gists_url":"https://api.github.com/users/ViktorHofer/gists{/gist_id}","starred_url":"https://api.github.com/users/ViktorHofer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ViktorHofer/subscriptions","organizations_url":"https://api.github.com/users/ViktorHofer/orgs","repos_url":"https://api.github.com/users/ViktorHofer/repos","events_url":"https://api.github.com/users/ViktorHofer/events{/privacy}","received_events_url":"https://api.github.com/users/ViktorHofer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ViktorHofer/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/ViktorHofer/corefx","forks_url":"https://api.github.com/repos/ViktorHofer/corefx/forks","keys_url":"https://api.github.com/repos/ViktorHofer/corefx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ViktorHofer/corefx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ViktorHofer/corefx/teams","hooks_url":"https://api.github.com/repos/ViktorHofer/corefx/hooks","issue_events_url":"https://api.github.com/repos/ViktorHofer/corefx/issues/events{/number}","events_url":"https://api.github.com/repos/ViktorHofer/corefx/events","assignees_url":"https://api.github.com/repos/ViktorHofer/corefx/assignees{/user}","branches_url":"https://api.github.com/repos/ViktorHofer/corefx/branches{/branch}","tags_url":"https://api.github.com/repos/ViktorHofer/corefx/tags","blobs_url":"https://api.github.com/repos/ViktorHofer/corefx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ViktorHofer/corefx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ViktorHofer/corefx/git/refs{/sha}","trees_url":"https://api.github.com/repos/ViktorHofer/corefx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ViktorHofer/corefx/statuses/{sha}","languages_url":"https://api.github.com/repos/ViktorHofer/corefx/languages","stargazers_url":"https://api.github.com/repos/ViktorHofer/corefx/stargazers","contributors_url":"https://api.github.com/repos/ViktorHofer/corefx/contributors","subscribers_url":"https://api.github.com/repos/ViktorHofer/corefx/subscribers","subscription_url":"https://api.github.com/repos/ViktorHofer/corefx/subscription","commits_url":"https://api.github.com/repos/ViktorHofer/corefx/commits{/sha}","git_commits_url":"https://api.github.com/repos/ViktorHofer/corefx/git/commits{/sha}","comments_url":"https://api.github.com/repos/ViktorHofer/corefx/comments{/number}","issue_comment_url":"https://api.github.com/repos/ViktorHofer/corefx/issues/comments{/number}","contents_url":"https://api.github.com/repos/ViktorHofer/corefx/contents/{+path}","compare_url":"https://api.github.com/repos/ViktorHofer/corefx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ViktorHofer/corefx/merges","archive_url":"https://api.github.com/repos/ViktorHofer/corefx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ViktorHofer/corefx/downloads","issues_url":"https://api.github.com/repos/ViktorHofer/corefx/issues{/number}","pulls_url":"https://api.github.com/repos/ViktorHofer/corefx/pulls{/number}","milestones_url":"https://api.github.com/repos/ViktorHofer/corefx/milestones{/number}","notifications_url":"https://api.github.com/repos/ViktorHofer/corefx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ViktorHofer/corefx/labels{/name}","releases_url":"https://api.github.com/repos/ViktorHofer/corefx/releases{/id}","deployments_url":"https://api.github.com/repos/ViktorHofer/corefx/deployments","created_at":"2017-03-19T19:49:18Z","updated_at":"2017-03-19T19:49:56Z","pushed_at":"2018-03-28T19:46:33Z","git_url":"git://github.com/ViktorHofer/corefx.git","ssh_url":"git@github.com:ViktorHofer/corefx.git","clone_url":"https://github.com/ViktorHofer/corefx.git","svn_url":"https://github.com/ViktorHofer/corefx","homepage":"https://docs.microsoft.com/dotnet/","size":174033,"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":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"f14366baaa80a893e53934b98e9786dac54c136f","user":{"login":"dotnet","id":9141961,"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,"name":"corefx","full_name":"dotnet/corefx","owner":{"login":"dotnet","id":9141961,"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-03-28T19:49:20Z","pushed_at":"2018-03-28T19:56:33Z","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":175649,"stargazers_count":13638,"watchers_count":13638,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3898,"mirror_url":null,"archived":false,"open_issues_count":2190,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":3898,"open_issues":2190,"watchers":13638,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/25509"},"html":{"href":"https://github.com/dotnet/corefx/pull/25509"},"issue":{"href":"https://api.github.com/repos/dotnet/corefx/issues/25509"},"comments":{"href":"https://api.github.com/repos/dotnet/corefx/issues/25509/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/25509/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/25509/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/corefx/statuses/b7c32d26325e52cf7426144f65a93561adf9a129"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"jkotas"}}