{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/31618","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/31618/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/31618/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/31618/events","html_url":"https://github.com/rust-lang/rust/pull/31618","id":133376397,"number":31618,"title":"Optimize some functions in std::process","user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"brson","id":147214,"avatar_url":"https://avatars.githubusercontent.com/u/147214?v=3","gravatar_id":"","url":"https://api.github.com/users/brson","html_url":"https://github.com/brson","followers_url":"https://api.github.com/users/brson/followers","following_url":"https://api.github.com/users/brson/following{/other_user}","gists_url":"https://api.github.com/users/brson/gists{/gist_id}","starred_url":"https://api.github.com/users/brson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brson/subscriptions","organizations_url":"https://api.github.com/users/brson/orgs","repos_url":"https://api.github.com/users/brson/repos","events_url":"https://api.github.com/users/brson/events{/privacy}","received_events_url":"https://api.github.com/users/brson/received_events","type":"User","site_admin":false},"milestone":null,"comments":33,"created_at":"2016-02-13T00:21:23Z","updated_at":"2016-03-09T02:00:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/31618","html_url":"https://github.com/rust-lang/rust/pull/31618","diff_url":"https://github.com/rust-lang/rust/pull/31618.diff","patch_url":"https://github.com/rust-lang/rust/pull/31618.patch"},"body":"* Be sure that `read_to_end` gets directed towards `read_to_end_uninitialized` for all handles\r\n* When spawning a child that guaranteed doesn't need a stdin, don't actually create a stdin pipe for that process, instead just redirect it to /dev/null\r\n* When calling `wait_with_output`, don't spawn threads to read out the pipes of the child. Instead drain all pipes on the calling thread and *then* wait on the process.\r\n\r\nFunctionally, it is intended that nothing changes as part of this PR\r\n\r\n---\r\n\r\nNote that this was the same as #31613, and even after that it turned out that fixing Windows was easier than I thought! To copy a comment from over there:\r\n\r\n> As some rationale for this as well, it's always bothered me that we've spawned threads in the standard library for this (seems a bit overkill), and I've also been curious lately as to our why our build times for Windows are so much higher than Unix (on the buildbots we have). I have done basically 0 investigation into why, but I figured it can't help to try to optimize Command::output which I believe is called quite a few times during the test suite.\r\n"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/194065912","html_url":"https://github.com/rust-lang/rust/pull/31618#issuecomment-194065912","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/31618","id":194065912,"user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"created_at":"2016-03-09T02:00:17Z","updated_at":"2016-03-09T02:00:17Z","body":"@bors: r=brson 96f181118140e251ce5aa1f9e55c95c76ed0f1e7\r\n\r\nNow with more assertions!"}}