{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/235101854","pull_request_review_id":176891023,"id":235101854,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTEwMTg1NA==","diff_hunk":"@@ -261,7 +264,7 @@ private static CultureInfo GetUserDefaultCulture()\n             return CultureInfo.GetUserDefaultCulture();\n         }\n \n-        private static string ConvertIcuTimeFormatString(string icuFormatString)\n+        private static string ConvertIcuTimeFormatString(ReadOnlySpan<char> icuFormatString)\n         {\n             StringBuilder sb = StringBuilderCache.Acquire(ICU_ULOC_FULLNAME_CAPACITY);","path":"src/System.Private.CoreLib/shared/System/Globalization/CultureData.Unix.cs","position":116,"original_position":116,"commit_id":"bcc973ee42207fc1ef867f2ddfdafbaa09492612","original_commit_id":"bcc973ee42207fc1ef867f2ddfdafbaa09492612","user":{"login":"eerhardt","id":8291187,"node_id":"MDQ6VXNlcjgyOTExODc=","avatar_url":"https://avatars3.githubusercontent.com/u/8291187?v=4","gravatar_id":"","url":"https://api.github.com/users/eerhardt","html_url":"https://github.com/eerhardt","followers_url":"https://api.github.com/users/eerhardt/followers","following_url":"https://api.github.com/users/eerhardt/following{/other_user}","gists_url":"https://api.github.com/users/eerhardt/gists{/gist_id}","starred_url":"https://api.github.com/users/eerhardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eerhardt/subscriptions","organizations_url":"https://api.github.com/users/eerhardt/orgs","repos_url":"https://api.github.com/users/eerhardt/repos","events_url":"https://api.github.com/users/eerhardt/events{/privacy}","received_events_url":"https://api.github.com/users/eerhardt/received_events","type":"User","site_admin":false},"body":"Why not stackalloc this as well?","created_at":"2018-11-20T17:37:15Z","updated_at":"2018-11-20T17:37:15Z","html_url":"https://github.com/dotnet/coreclr/pull/21120#discussion_r235101854","pull_request_url":"https://api.github.com/repos/dotnet/coreclr/pulls/21120","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/235101854"},"html":{"href":"https://github.com/dotnet/coreclr/pull/21120#discussion_r235101854"},"pull_request":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/21120"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/21120","id":232384774,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyMzg0Nzc0","html_url":"https://github.com/dotnet/coreclr/pull/21120","diff_url":"https://github.com/dotnet/coreclr/pull/21120.diff","patch_url":"https://github.com/dotnet/coreclr/pull/21120.patch","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/21120","number":21120,"state":"open","locked":false,"title":"Remove remaining StringBuilder marshaling use from Corelib","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":"- Unix globalization functions were using StringBuilder.  Replaced them with stackallocs, as the max sizes were all relatively small.\r\n- Registry methods were declared to use StringBuilder, but these weren't actually used by corelib, and in fact, corefx isn't using StringBuilder with them either.  I've changed the definitions for now to use char[] instead (all the call sites are passing in null), and I'll fix up some corefx usage separately.\r\n- Resource-related functions were using StringBuilder, and have been replaced with stackallocs, given reasonably small max buffer sizes.\r\n- ExpandEnvironmentVariables was using a StringBuilder, but it's rewritten equivalent code in corefx is not.  For now I've copied the corefx function over to coreclr to replace the different implementation, but we can look at subsequently consolidating them into one.\r\n\r\ncc: @jkotas, @JeremyKuhne, @eerhardt, @tarekgh ","created_at":"2018-11-20T16:38:41Z","updated_at":"2018-11-20T17:37:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"126a85a035a4399b22190a64eb55d2b4db8b256b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/coreclr/pulls/21120/commits","review_comments_url":"https://api.github.com/repos/dotnet/coreclr/pulls/21120/comments","review_comment_url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/21120/comments","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/bcc973ee42207fc1ef867f2ddfdafbaa09492612","head":{"label":"stephentoub:sbmarshaling","ref":"sbmarshaling","sha":"bcc973ee42207fc1ef867f2ddfdafbaa09492612","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},"repo":{"id":30271698,"node_id":"MDEwOlJlcG9zaXRvcnkzMDI3MTY5OA==","name":"coreclr","full_name":"stephentoub/coreclr","private":false,"owner":{"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},"html_url":"https://github.com/stephentoub/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR. It is an execution engine for .NET apps, performing functions such as IL byte code loading, compilation to machine code and garbage collection. The repo contains the complete up-to-date CoreCLR codebase.","fork":true,"url":"https://api.github.com/repos/stephentoub/coreclr","forks_url":"https://api.github.com/repos/stephentoub/coreclr/forks","keys_url":"https://api.github.com/repos/stephentoub/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stephentoub/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stephentoub/coreclr/teams","hooks_url":"https://api.github.com/repos/stephentoub/coreclr/hooks","issue_events_url":"https://api.github.com/repos/stephentoub/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/stephentoub/coreclr/events","assignees_url":"https://api.github.com/repos/stephentoub/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/stephentoub/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/stephentoub/coreclr/tags","blobs_url":"https://api.github.com/repos/stephentoub/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stephentoub/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stephentoub/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/stephentoub/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stephentoub/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/stephentoub/coreclr/languages","stargazers_url":"https://api.github.com/repos/stephentoub/coreclr/stargazers","contributors_url":"https://api.github.com/repos/stephentoub/coreclr/contributors","subscribers_url":"https://api.github.com/repos/stephentoub/coreclr/subscribers","subscription_url":"https://api.github.com/repos/stephentoub/coreclr/subscription","commits_url":"https://api.github.com/repos/stephentoub/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/stephentoub/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/stephentoub/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/stephentoub/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/stephentoub/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/stephentoub/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stephentoub/coreclr/merges","archive_url":"https://api.github.com/repos/stephentoub/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stephentoub/coreclr/downloads","issues_url":"https://api.github.com/repos/stephentoub/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/stephentoub/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/stephentoub/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/stephentoub/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stephentoub/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/stephentoub/coreclr/releases{/id}","deployments_url":"https://api.github.com/repos/stephentoub/coreclr/deployments","created_at":"2015-02-04T00:05:29Z","updated_at":"2018-11-19T21:56:21Z","pushed_at":"2018-11-20T17:03:10Z","git_url":"git://github.com/stephentoub/coreclr.git","ssh_url":"git@github.com:stephentoub/coreclr.git","clone_url":"https://github.com/stephentoub/coreclr.git","svn_url":"https://github.com/stephentoub/coreclr","homepage":"","size":249890,"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":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"dcc47ed99b31161c12b6ed51cf9f69e3116be6c1","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":30092893,"node_id":"MDEwOlJlcG9zaXRvcnkzMDA5Mjg5Mw==","name":"coreclr","full_name":"dotnet/coreclr","private":false,"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},"html_url":"https://github.com/dotnet/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR, and the base library, called System.Private.Corelib (or mscorlib). It includes the garbage collector, JIT compiler, base .NET data types and many low-level classes. We welcome contributions.","fork":false,"url":"https://api.github.com/repos/dotnet/coreclr","forks_url":"https://api.github.com/repos/dotnet/coreclr/forks","keys_url":"https://api.github.com/repos/dotnet/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/coreclr/teams","hooks_url":"https://api.github.com/repos/dotnet/coreclr/hooks","issue_events_url":"https://api.github.com/repos/dotnet/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/coreclr/events","assignees_url":"https://api.github.com/repos/dotnet/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/coreclr/tags","blobs_url":"https://api.github.com/repos/dotnet/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/coreclr/languages","stargazers_url":"https://api.github.com/repos/dotnet/coreclr/stargazers","contributors_url":"https://api.github.com/repos/dotnet/coreclr/contributors","subscribers_url":"https://api.github.com/repos/dotnet/coreclr/subscribers","subscription_url":"https://api.github.com/repos/dotnet/coreclr/subscription","commits_url":"https://api.github.com/repos/dotnet/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/coreclr/merges","archive_url":"https://api.github.com/repos/dotnet/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/coreclr/downloads","issues_url":"https://api.github.com/repos/dotnet/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/coreclr/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/coreclr/deployments","created_at":"2015-01-30T22:10:02Z","updated_at":"2018-11-20T15:57:17Z","pushed_at":"2018-11-20T17:14:23Z","git_url":"git://github.com/dotnet/coreclr.git","ssh_url":"git@github.com:dotnet/coreclr.git","clone_url":"https://github.com/dotnet/coreclr.git","svn_url":"https://github.com/dotnet/coreclr","homepage":"https://github.com/dotnet/core","size":254828,"stargazers_count":10517,"watchers_count":10517,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2512,"mirror_url":null,"archived":false,"open_issues_count":2025,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2512,"open_issues":2025,"watchers":10517,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/21120"},"html":{"href":"https://github.com/dotnet/coreclr/pull/21120"},"issue":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/21120"},"comments":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/21120/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/21120/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/21120/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/coreclr/statuses/bcc973ee42207fc1ef867f2ddfdafbaa09492612"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"eerhardt"}}