{"action":"opened","number":23210,"pull_request":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/23210","id":135552890,"html_url":"https://github.com/dotnet/corefx/pull/23210","diff_url":"https://github.com/dotnet/corefx/pull/23210.diff","patch_url":"https://github.com/dotnet/corefx/pull/23210.patch","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/23210","number":23210,"state":"open","locked":false,"title":"avoid async overhead in ReadNextLineAsync when possible","user":{"login":"geoffkizer","id":12518809,"avatar_url":"https://avatars2.githubusercontent.com/u/12518809?v=4","gravatar_id":"","url":"https://api.github.com/users/geoffkizer","html_url":"https://github.com/geoffkizer","followers_url":"https://api.github.com/users/geoffkizer/followers","following_url":"https://api.github.com/users/geoffkizer/following{/other_user}","gists_url":"https://api.github.com/users/geoffkizer/gists{/gist_id}","starred_url":"https://api.github.com/users/geoffkizer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoffkizer/subscriptions","organizations_url":"https://api.github.com/users/geoffkizer/orgs","repos_url":"https://api.github.com/users/geoffkizer/repos","events_url":"https://api.github.com/users/geoffkizer/events{/privacy}","received_events_url":"https://api.github.com/users/geoffkizer/received_events","type":"User","site_admin":false},"body":"ReadNextLineAsync typically completes synchronously.  So, change it to be TryReadLine and change callers to call FillAsync themselves when necessary.  This avoids the overhead of an async method invocation unless it's actually needed.\r\n\r\nThis shows about a 4% improvement on the HttpClientPerf GET test.\r\n\r\n@stephentoub ","created_at":"2017-08-14T08:51:03Z","updated_at":"2017-08-14T08:51:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/corefx/pulls/23210/commits","review_comments_url":"https://api.github.com/repos/dotnet/corefx/pulls/23210/comments","review_comment_url":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/23210/comments","statuses_url":"https://api.github.com/repos/dotnet/corefx/statuses/df2019695c0934b32236695831e1f3b58df98f66","head":{"label":"geoffkizer:readnextline","ref":"readnextline","sha":"df2019695c0934b32236695831e1f3b58df98f66","user":{"login":"geoffkizer","id":12518809,"avatar_url":"https://avatars2.githubusercontent.com/u/12518809?v=4","gravatar_id":"","url":"https://api.github.com/users/geoffkizer","html_url":"https://github.com/geoffkizer","followers_url":"https://api.github.com/users/geoffkizer/followers","following_url":"https://api.github.com/users/geoffkizer/following{/other_user}","gists_url":"https://api.github.com/users/geoffkizer/gists{/gist_id}","starred_url":"https://api.github.com/users/geoffkizer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoffkizer/subscriptions","organizations_url":"https://api.github.com/users/geoffkizer/orgs","repos_url":"https://api.github.com/users/geoffkizer/repos","events_url":"https://api.github.com/users/geoffkizer/events{/privacy}","received_events_url":"https://api.github.com/users/geoffkizer/received_events","type":"User","site_admin":false},"repo":{"id":50082194,"name":"corefx","full_name":"geoffkizer/corefx","owner":{"login":"geoffkizer","id":12518809,"avatar_url":"https://avatars2.githubusercontent.com/u/12518809?v=4","gravatar_id":"","url":"https://api.github.com/users/geoffkizer","html_url":"https://github.com/geoffkizer","followers_url":"https://api.github.com/users/geoffkizer/followers","following_url":"https://api.github.com/users/geoffkizer/following{/other_user}","gists_url":"https://api.github.com/users/geoffkizer/gists{/gist_id}","starred_url":"https://api.github.com/users/geoffkizer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoffkizer/subscriptions","organizations_url":"https://api.github.com/users/geoffkizer/orgs","repos_url":"https://api.github.com/users/geoffkizer/repos","events_url":"https://api.github.com/users/geoffkizer/events{/privacy}","received_events_url":"https://api.github.com/users/geoffkizer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/geoffkizer/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/geoffkizer/corefx","forks_url":"https://api.github.com/repos/geoffkizer/corefx/forks","keys_url":"https://api.github.com/repos/geoffkizer/corefx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geoffkizer/corefx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geoffkizer/corefx/teams","hooks_url":"https://api.github.com/repos/geoffkizer/corefx/hooks","issue_events_url":"https://api.github.com/repos/geoffkizer/corefx/issues/events{/number}","events_url":"https://api.github.com/repos/geoffkizer/corefx/events","assignees_url":"https://api.github.com/repos/geoffkizer/corefx/assignees{/user}","branches_url":"https://api.github.com/repos/geoffkizer/corefx/branches{/branch}","tags_url":"https://api.github.com/repos/geoffkizer/corefx/tags","blobs_url":"https://api.github.com/repos/geoffkizer/corefx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geoffkizer/corefx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geoffkizer/corefx/git/refs{/sha}","trees_url":"https://api.github.com/repos/geoffkizer/corefx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geoffkizer/corefx/statuses/{sha}","languages_url":"https://api.github.com/repos/geoffkizer/corefx/languages","stargazers_url":"https://api.github.com/repos/geoffkizer/corefx/stargazers","contributors_url":"https://api.github.com/repos/geoffkizer/corefx/contributors","subscribers_url":"https://api.github.com/repos/geoffkizer/corefx/subscribers","subscription_url":"https://api.github.com/repos/geoffkizer/corefx/subscription","commits_url":"https://api.github.com/repos/geoffkizer/corefx/commits{/sha}","git_commits_url":"https://api.github.com/repos/geoffkizer/corefx/git/commits{/sha}","comments_url":"https://api.github.com/repos/geoffkizer/corefx/comments{/number}","issue_comment_url":"https://api.github.com/repos/geoffkizer/corefx/issues/comments{/number}","contents_url":"https://api.github.com/repos/geoffkizer/corefx/contents/{+path}","compare_url":"https://api.github.com/repos/geoffkizer/corefx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geoffkizer/corefx/merges","archive_url":"https://api.github.com/repos/geoffkizer/corefx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geoffkizer/corefx/downloads","issues_url":"https://api.github.com/repos/geoffkizer/corefx/issues{/number}","pulls_url":"https://api.github.com/repos/geoffkizer/corefx/pulls{/number}","milestones_url":"https://api.github.com/repos/geoffkizer/corefx/milestones{/number}","notifications_url":"https://api.github.com/repos/geoffkizer/corefx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geoffkizer/corefx/labels{/name}","releases_url":"https://api.github.com/repos/geoffkizer/corefx/releases{/id}","deployments_url":"https://api.github.com/repos/geoffkizer/corefx/deployments","created_at":"2016-01-21T04:31:55Z","updated_at":"2016-01-21T04:32:18Z","pushed_at":"2017-08-14T08:27:27Z","git_url":"git://github.com/geoffkizer/corefx.git","ssh_url":"git@github.com:geoffkizer/corefx.git","clone_url":"https://github.com/geoffkizer/corefx.git","svn_url":"https://github.com/geoffkizer/corefx","homepage":"http://dotnet.github.io/","size":149776,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"7dba9cd923baee7dd0bab87b102af9fd11ffc75e","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":"2017-08-14T06:45:57Z","pushed_at":"2017-08-14T07:09:04Z","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":154144,"stargazers_count":12289,"watchers_count":12289,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3373,"mirror_url":null,"open_issues_count":1833,"forks":3373,"open_issues":1833,"watchers":12289,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/23210"},"html":{"href":"https://github.com/dotnet/corefx/pull/23210"},"issue":{"href":"https://api.github.com/repos/dotnet/corefx/issues/23210"},"comments":{"href":"https://api.github.com/repos/dotnet/corefx/issues/23210/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/23210/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/23210/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/corefx/statuses/df2019695c0934b32236695831e1f3b58df98f66"}},"merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":60,"deletions":41,"changed_files":2}}
{"actor":{"display_login":"geoffkizer"}}