{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/cargo/issues/7396","repository_url":"https://api.github.com/repos/rust-lang/cargo","labels_url":"https://api.github.com/repos/rust-lang/cargo/issues/7396/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/cargo/issues/7396/comments","events_url":"https://api.github.com/repos/rust-lang/cargo/issues/7396/events","html_url":"https://github.com/rust-lang/cargo/issues/7396","id":496562331,"node_id":"MDU6SXNzdWU0OTY1NjIzMzE=","number":7396,"title":"optimize dep queue by recording and using crate build times","user":{"login":"matthiaskrgr","id":476013,"node_id":"MDQ6VXNlcjQ3NjAxMw==","avatar_url":"https://avatars2.githubusercontent.com/u/476013?v=4","gravatar_id":"","url":"https://api.github.com/users/matthiaskrgr","html_url":"https://github.com/matthiaskrgr","followers_url":"https://api.github.com/users/matthiaskrgr/followers","following_url":"https://api.github.com/users/matthiaskrgr/following{/other_user}","gists_url":"https://api.github.com/users/matthiaskrgr/gists{/gist_id}","starred_url":"https://api.github.com/users/matthiaskrgr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthiaskrgr/subscriptions","organizations_url":"https://api.github.com/users/matthiaskrgr/orgs","repos_url":"https://api.github.com/users/matthiaskrgr/repos","events_url":"https://api.github.com/users/matthiaskrgr/events{/privacy}","received_events_url":"https://api.github.com/users/matthiaskrgr/received_events","type":"User","site_admin":false},"labels":[{"id":677709505,"node_id":"MDU6TGFiZWw2Nzc3MDk1MDU=","url":"https://api.github.com/repos/rust-lang/cargo/labels/C-feature-request","name":"C-feature-request","color":"f5f1fd","default":false},{"id":1353173145,"node_id":"MDU6TGFiZWwxMzUzMTczMTQ1","url":"https://api.github.com/repos/rust-lang/cargo/labels/Performance","name":"Performance","color":"b8f9a9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2019-09-20T21:57:14Z","updated_at":"2019-09-26T14:34:47Z","closed_at":null,"author_association":"MEMBER","body":"<!-- Thanks for filing a 🙋 feature request 😄! -->\r\n\r\n**Describe the problem you are trying to solve**\r\nThere are a couple of things in the dep queue that could be improved.\r\nSometimes we and up waiting on a single dep where things could run partly in parallel if the dep queue was ordered differently.\r\n\r\n\r\n\r\n**Describe the solution you'd like**\r\nIf we knew how long a crate usually takes to build on the build host, we could estimates of how long parts of the dep graph take to build and make better decisions on what parts of the tree to start building first, or if it pays out to delay a package artificially in order to build it at a later stage to improve parallelism.\r\n\r\nPerhaps we could save build times, compiler version used, build flags, crate metadata etc for each crate and save the data to a file inside the $CARGO_HOME and later read it to improve ordering of the dep queue.\r\n\r\n \r\n\r\n**Notes**\r\nWe probably need to make sure that the files does not grow too much and prune old entries from the crate-build-time database from time to time.\r\n"},"comment":{"url":"https://api.github.com/repos/rust-lang/cargo/issues/comments/535532376","html_url":"https://github.com/rust-lang/cargo/issues/7396#issuecomment-535532376","issue_url":"https://api.github.com/repos/rust-lang/cargo/issues/7396","id":535532376,"node_id":"MDEyOklzc3VlQ29tbWVudDUzNTUzMjM3Ng==","user":{"login":"Eh2406","id":3709504,"node_id":"MDQ6VXNlcjM3MDk1MDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/3709504?v=4","gravatar_id":"","url":"https://api.github.com/users/Eh2406","html_url":"https://github.com/Eh2406","followers_url":"https://api.github.com/users/Eh2406/followers","following_url":"https://api.github.com/users/Eh2406/following{/other_user}","gists_url":"https://api.github.com/users/Eh2406/gists{/gist_id}","starred_url":"https://api.github.com/users/Eh2406/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eh2406/subscriptions","organizations_url":"https://api.github.com/users/Eh2406/orgs","repos_url":"https://api.github.com/users/Eh2406/repos","events_url":"https://api.github.com/users/Eh2406/events{/privacy}","received_events_url":"https://api.github.com/users/Eh2406/received_events","type":"User","site_admin":false},"created_at":"2019-09-26T14:34:47Z","updated_at":"2019-09-26T14:34:47Z","author_association":"CONTRIBUTOR","body":"At a meetup last night we were talking about this. We realized there's a tiny version of this that is still useful. If we record the full [`DependencyQueue`](https://github.com/rust-lang/cargo/blob/73d8d2d329495aabaa5f7962404f108d573a1395/src/cargo/util/dependency_queue.rs#L55) into the `-Ztinings` report then we can add some useful statistics to that report. For example `time to compile critical path`, and approximate total compile times with different scheduling algorithms. If this report shows there are algorithms that could save time then we have strong evidence to encourage doing the design work to have cargo collect the data and use the algorithm."}}
{"actor":{"display_login":"Eh2406"}}