{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/24291989","id":24291989,"diff_hunk":"@@ -817,7 +836,7 @@ public override Task<String> ReadLineAsync()\n                 } while (i < tmpCharLen);\n \n                 i = tmpCharLen - tmpCharPos;\n-                if (sb == null) sb = new StringBuilder(i + 80);\n+                if (sb == null) sb = AcquireStringBuilder(i + 80);","path":"src/mscorlib/src/System/IO/StreamReader.cs","position":56,"original_position":56,"commit_id":"7057875f763697cd4da693bd345ef80db278cbc0","original_commit_id":"7057875f763697cd4da693bd345ef80db278cbc0","user":{"login":"pharring","id":9952654,"avatar_url":"https://avatars.githubusercontent.com/u/9952654?v=3","gravatar_id":"","url":"https://api.github.com/users/pharring","html_url":"https://github.com/pharring","followers_url":"https://api.github.com/users/pharring/followers","following_url":"https://api.github.com/users/pharring/following{/other_user}","gists_url":"https://api.github.com/users/pharring/gists{/gist_id}","starred_url":"https://api.github.com/users/pharring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pharring/subscriptions","organizations_url":"https://api.github.com/users/pharring/orgs","repos_url":"https://api.github.com/users/pharring/repos","events_url":"https://api.github.com/users/pharring/events{/privacy}","received_events_url":"https://api.github.com/users/pharring/received_events","type":"User","site_admin":false},"body":"Caution: You're in an async method here. Control flow will return to the caller at the await on line 823. Are you sure that it's OK to use the shared StringBuilder in this case?","created_at":"2015-02-07T19:26:38Z","updated_at":"2015-02-07T19:26:38Z","html_url":"https://github.com/dotnet/coreclr/pull/129#discussion_r24291989","pull_request_url":"https://api.github.com/repos/dotnet/coreclr/pulls/129","_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/24291989"},"html":{"href":"https://github.com/dotnet/coreclr/pull/129#discussion_r24291989"},"pull_request":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/129"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/129","id":28863074,"html_url":"https://github.com/dotnet/coreclr/pull/129","diff_url":"https://github.com/dotnet/coreclr/pull/129.diff","patch_url":"https://github.com/dotnet/coreclr/pull/129.patch","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/129","number":129,"state":"open","locked":false,"title":"StreamReader: Cache a single instance of StringBuilder for each reader to improve performance","user":{"login":"Knagis","id":8700285,"avatar_url":"https://avatars.githubusercontent.com/u/8700285?v=3","gravatar_id":"","url":"https://api.github.com/users/Knagis","html_url":"https://github.com/Knagis","followers_url":"https://api.github.com/users/Knagis/followers","following_url":"https://api.github.com/users/Knagis/following{/other_user}","gists_url":"https://api.github.com/users/Knagis/gists{/gist_id}","starred_url":"https://api.github.com/users/Knagis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Knagis/subscriptions","organizations_url":"https://api.github.com/users/Knagis/orgs","repos_url":"https://api.github.com/users/Knagis/repos","events_url":"https://api.github.com/users/Knagis/events{/privacy}","received_events_url":"https://api.github.com/users/Knagis/received_events","type":"User","site_admin":false},"body":"For the 10MB progit.md text file:\r\n\r\nStringBuilder allocations (for a single pass through the file): \r\n\r\nOriginal: 3955\r\nStringBuilderCache: 2286\r\n**Instance cache: 3**\r\n\r\nTime spent, ms (against a MemoryStream):\r\nOriginal: 37.65\r\nStringBuilderCache: 38.04\r\n**Instance cache: 37.25**\r\n\r\nThe performance is consistent between runs. With or without explicit `GC.Collect()` calls.","created_at":"2015-02-07T11:31:49Z","updated_at":"2015-02-07T19:26:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8720e616b3883de0dfd892162cefb006d27a3e52","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/coreclr/pulls/129/commits","review_comments_url":"https://api.github.com/repos/dotnet/coreclr/pulls/129/comments","review_comment_url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/{number}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/129/comments","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/7057875f763697cd4da693bd345ef80db278cbc0","head":{"label":"Knagis:master","ref":"master","sha":"7057875f763697cd4da693bd345ef80db278cbc0","user":{"login":"Knagis","id":8700285,"avatar_url":"https://avatars.githubusercontent.com/u/8700285?v=3","gravatar_id":"","url":"https://api.github.com/users/Knagis","html_url":"https://github.com/Knagis","followers_url":"https://api.github.com/users/Knagis/followers","following_url":"https://api.github.com/users/Knagis/following{/other_user}","gists_url":"https://api.github.com/users/Knagis/gists{/gist_id}","starred_url":"https://api.github.com/users/Knagis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Knagis/subscriptions","organizations_url":"https://api.github.com/users/Knagis/orgs","repos_url":"https://api.github.com/users/Knagis/repos","events_url":"https://api.github.com/users/Knagis/events{/privacy}","received_events_url":"https://api.github.com/users/Knagis/received_events","type":"User","site_admin":false},"repo":{"id":30451098,"name":"coreclr","full_name":"Knagis/coreclr","owner":{"login":"Knagis","id":8700285,"avatar_url":"https://avatars.githubusercontent.com/u/8700285?v=3","gravatar_id":"","url":"https://api.github.com/users/Knagis","html_url":"https://github.com/Knagis","followers_url":"https://api.github.com/users/Knagis/followers","following_url":"https://api.github.com/users/Knagis/following{/other_user}","gists_url":"https://api.github.com/users/Knagis/gists{/gist_id}","starred_url":"https://api.github.com/users/Knagis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Knagis/subscriptions","organizations_url":"https://api.github.com/users/Knagis/orgs","repos_url":"https://api.github.com/users/Knagis/repos","events_url":"https://api.github.com/users/Knagis/events{/privacy}","received_events_url":"https://api.github.com/users/Knagis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Knagis/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/Knagis/coreclr","forks_url":"https://api.github.com/repos/Knagis/coreclr/forks","keys_url":"https://api.github.com/repos/Knagis/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Knagis/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Knagis/coreclr/teams","hooks_url":"https://api.github.com/repos/Knagis/coreclr/hooks","issue_events_url":"https://api.github.com/repos/Knagis/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/Knagis/coreclr/events","assignees_url":"https://api.github.com/repos/Knagis/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/Knagis/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/Knagis/coreclr/tags","blobs_url":"https://api.github.com/repos/Knagis/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Knagis/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Knagis/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/Knagis/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Knagis/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/Knagis/coreclr/languages","stargazers_url":"https://api.github.com/repos/Knagis/coreclr/stargazers","contributors_url":"https://api.github.com/repos/Knagis/coreclr/contributors","subscribers_url":"https://api.github.com/repos/Knagis/coreclr/subscribers","subscription_url":"https://api.github.com/repos/Knagis/coreclr/subscription","commits_url":"https://api.github.com/repos/Knagis/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/Knagis/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/Knagis/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/Knagis/coreclr/issues/comments/{number}","contents_url":"https://api.github.com/repos/Knagis/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/Knagis/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Knagis/coreclr/merges","archive_url":"https://api.github.com/repos/Knagis/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Knagis/coreclr/downloads","issues_url":"https://api.github.com/repos/Knagis/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/Knagis/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/Knagis/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/Knagis/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Knagis/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/Knagis/coreclr/releases{/id}","created_at":"2015-02-07T09:21:43Z","updated_at":"2015-02-07T17:08:48Z","pushed_at":"2015-02-07T17:08:48Z","git_url":"git://github.com/Knagis/coreclr.git","ssh_url":"git@github.com:Knagis/coreclr.git","clone_url":"https://github.com/Knagis/coreclr.git","svn_url":"https://github.com/Knagis/coreclr","homepage":"","size":26125,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"9df15b9fdfb55ce2076a5e7eede8ca71481e5e3b","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","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,"name":"coreclr","full_name":"dotnet/coreclr","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","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/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":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}","created_at":"2015-01-30T22:10:02Z","updated_at":"2015-02-07T19:04:38Z","pushed_at":"2015-02-07T17:15:45Z","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":"","size":26125,"stargazers_count":3008,"watchers_count":3008,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":429,"mirror_url":null,"open_issues_count":33,"forks":429,"open_issues":33,"watchers":3008,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/129"},"html":{"href":"https://github.com/dotnet/coreclr/pull/129"},"issue":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/129"},"comments":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/129/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/129/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/129/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/coreclr/statuses/7057875f763697cd4da693bd345ef80db278cbc0"}}}}