{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/37064","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/37064/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/37064/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/37064/events","html_url":"https://github.com/rust-lang/rust/pull/37064","id":181918926,"number":37064,"title":"Avoid allocations in `Decoder::read_str`.","user":{"login":"nnethercote","id":1940286,"avatar_url":"https://avatars.githubusercontent.com/u/1940286?v=3","gravatar_id":"","url":"https://api.github.com/users/nnethercote","html_url":"https://github.com/nnethercote","followers_url":"https://api.github.com/users/nnethercote/followers","following_url":"https://api.github.com/users/nnethercote/following{/other_user}","gists_url":"https://api.github.com/users/nnethercote/gists{/gist_id}","starred_url":"https://api.github.com/users/nnethercote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nnethercote/subscriptions","organizations_url":"https://api.github.com/users/nnethercote/orgs","repos_url":"https://api.github.com/users/nnethercote/repos","events_url":"https://api.github.com/users/nnethercote/events{/privacy}","received_events_url":"https://api.github.com/users/nnethercote/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"eddyb","id":77424,"avatar_url":"https://avatars.githubusercontent.com/u/77424?v=3","gravatar_id":"","url":"https://api.github.com/users/eddyb","html_url":"https://github.com/eddyb","followers_url":"https://api.github.com/users/eddyb/followers","following_url":"https://api.github.com/users/eddyb/following{/other_user}","gists_url":"https://api.github.com/users/eddyb/gists{/gist_id}","starred_url":"https://api.github.com/users/eddyb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddyb/subscriptions","organizations_url":"https://api.github.com/users/eddyb/orgs","repos_url":"https://api.github.com/users/eddyb/repos","events_url":"https://api.github.com/users/eddyb/events{/privacy}","received_events_url":"https://api.github.com/users/eddyb/received_events","type":"User","site_admin":false},"assignees":[{"login":"eddyb","id":77424,"avatar_url":"https://avatars.githubusercontent.com/u/77424?v=3","gravatar_id":"","url":"https://api.github.com/users/eddyb","html_url":"https://github.com/eddyb","followers_url":"https://api.github.com/users/eddyb/followers","following_url":"https://api.github.com/users/eddyb/following{/other_user}","gists_url":"https://api.github.com/users/eddyb/gists{/gist_id}","starred_url":"https://api.github.com/users/eddyb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddyb/subscriptions","organizations_url":"https://api.github.com/users/eddyb/orgs","repos_url":"https://api.github.com/users/eddyb/repos","events_url":"https://api.github.com/users/eddyb/events{/privacy}","received_events_url":"https://api.github.com/users/eddyb/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2016-10-09T23:19:47Z","updated_at":"2016-10-09T23:38:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/37064","html_url":"https://github.com/rust-lang/rust/pull/37064","diff_url":"https://github.com/rust-lang/rust/pull/37064.diff","patch_url":"https://github.com/rust-lang/rust/pull/37064.patch"},"body":"`opaque::Decoder::read_str` is very hot within `rustc` due to its use in\r\nthe reading of crate metadata, and it currently returns a `String`. This\r\ncommit changes it to instead return a `Cow<str>`, which avoids a heap\r\nallocation.\r\n\r\nThis change reduces the number of calls to `malloc` by almost 10% in\r\nsome benchmarks.\r\n\r\nThis is a [breaking-change] to libserialize."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/252521111","html_url":"https://github.com/rust-lang/rust/pull/37064#issuecomment-252521111","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/37064","id":252521111,"user":{"login":"nnethercote","id":1940286,"avatar_url":"https://avatars.githubusercontent.com/u/1940286?v=3","gravatar_id":"","url":"https://api.github.com/users/nnethercote","html_url":"https://github.com/nnethercote","followers_url":"https://api.github.com/users/nnethercote/followers","following_url":"https://api.github.com/users/nnethercote/following{/other_user}","gists_url":"https://api.github.com/users/nnethercote/gists{/gist_id}","starred_url":"https://api.github.com/users/nnethercote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nnethercote/subscriptions","organizations_url":"https://api.github.com/users/nnethercote/orgs","repos_url":"https://api.github.com/users/nnethercote/repos","events_url":"https://api.github.com/users/nnethercote/events{/privacy}","received_events_url":"https://api.github.com/users/nnethercote/received_events","type":"User","site_admin":false},"created_at":"2016-10-09T23:38:14Z","updated_at":"2016-10-09T23:38:14Z","body":"@eddyb: bleh, I pushed with some uncommitted changes. New version should be better."}}
{"actor":{"display_login":"nnethercote"}}