{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/7782","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/7782/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/7782/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/7782/events","html_url":"https://github.com/dotnet/corefx/pull/7782","id":148783944,"number":7782,"title":"Async improvements to System.IO","user":{"login":"jamesqo","id":9159214,"avatar_url":"https://avatars.githubusercontent.com/u/9159214?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesqo","html_url":"https://github.com/jamesqo","followers_url":"https://api.github.com/users/jamesqo/followers","following_url":"https://api.github.com/users/jamesqo/following{/other_user}","gists_url":"https://api.github.com/users/jamesqo/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesqo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesqo/subscriptions","organizations_url":"https://api.github.com/users/jamesqo/orgs","repos_url":"https://api.github.com/users/jamesqo/repos","events_url":"https://api.github.com/users/jamesqo/events{/privacy}","received_events_url":"https://api.github.com/users/jamesqo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/corefx/labels/cla-already-signed","name":"cla-already-signed","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-15T22:28:30Z","updated_at":"2016-04-15T22:45:25Z","closed_at":"2016-04-15T22:42:20Z","pull_request":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/7782","html_url":"https://github.com/dotnet/corefx/pull/7782","diff_url":"https://github.com/dotnet/corefx/pull/7782.diff","patch_url":"https://github.com/dotnet/corefx/pull/7782.patch"},"body":"This PR introduces the following changes:\r\n\r\n- The null-object Stream, StreamReader, TextReader, and TextWriters now have better performance.\r\n  - `Stream.Null` overrides `CopyToAsync`, and now returns cached tasks for async flush/read/write.\r\n  - `StreamReader.Null` overrides `ReadBlock` and `ReadToEnd`, and returns cached tasks in async methods.\r\n    - Ditto for `TextReader.Null`.\r\n  - `TextWriter.Null` now overrides a bunch of `Write` and `WriteLine` (both sync and async) methods to either noop or return a cached task.\r\n- A `TaskCache` class has been introduced in `Common` that holds completed tasks for the following values:\r\n  - `Task<int>` with result 0\r\n  - `Task<string>` with a null result\r\n  - `Task<string>` for the empty string\r\n- `MemoryStream` now returns cached tasks instead of using `async` where it isn't needed.\r\n- `BufferedStream` and `StringReader` now make use of `TaskCache.Zero` in `Read`-related methods where they were previously using `Task.FromResult`.\r\n\r\ncc @hughbe  @JonHanna @justinvp @stephentoub"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/210673054","html_url":"https://github.com/dotnet/corefx/pull/7782#issuecomment-210673054","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/7782","id":210673054,"user":{"login":"hughbe","id":1275900,"avatar_url":"https://avatars.githubusercontent.com/u/1275900?v=3","gravatar_id":"","url":"https://api.github.com/users/hughbe","html_url":"https://github.com/hughbe","followers_url":"https://api.github.com/users/hughbe/followers","following_url":"https://api.github.com/users/hughbe/following{/other_user}","gists_url":"https://api.github.com/users/hughbe/gists{/gist_id}","starred_url":"https://api.github.com/users/hughbe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hughbe/subscriptions","organizations_url":"https://api.github.com/users/hughbe/orgs","repos_url":"https://api.github.com/users/hughbe/repos","events_url":"https://api.github.com/users/hughbe/events{/privacy}","received_events_url":"https://api.github.com/users/hughbe/received_events","type":"User","site_admin":false},"created_at":"2016-04-15T22:45:25Z","updated_at":"2016-04-15T22:45:25Z","body":"@stephentoub this isn't related to this PR but are there plans to move more mscorlib files from coreclr to corefx - obviously this is not a high priority issue, but is this in the post-release roadmap"}}