-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update dependency queue to consider cost for each node #8908
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
@bors: r+ Thanks for this! One thing I've wished we could get at some point is an idea of how impactful these scheduling decisions are. I don't know myself how much of an effect they really have on the build, and one of the things I worry about is that they're most impactful for full builds with a cold cache, meaning we may not necessarily have info from `-Ztimings] unfortunately. |
📌 Commit dd5aca3 has been approved by |
☀️ Test successful - checks-actions |
Update cargo 12 commits in bfca1cd22bf514d5f2b6c1089b0ded0ba7dfaa6e..63d0fe43449adcb316d34d98a982b597faca4178 2020-11-24 16:33:21 +0000 to 2020-12-02 01:44:30 +0000 - Add "--workspace" to update command (rust-lang/cargo#8725) - Add an FAQ for "Why is my crate rebuilt?" (rust-lang/cargo#8927) - Set docs.rs as the default extern-map for crates.io (rust-lang/cargo#8877) - remove extra whitespace when running cargo -Z help (rust-lang/cargo#8924) - Remove version from dev-dependencies to make it easier to publish. (rust-lang/cargo#8920) - update dependency queue to consider cost for each node (rust-lang/cargo#8908) - Fix some rustdoc warnings. (rust-lang/cargo#8911) - Bump miow dependency to not invalidly assume memory layout (rust-lang/cargo#8909) - Remove unnecessary trailing semicolons (rust-lang/cargo#8906) - Fix custom_target_dependency test. (rust-lang/cargo#8907) - fix: we don't ignore `version` for `git`/`path` deps now (rust-lang/cargo#8900) - doc (book): add "Getting Started" subsection: "Essential Terminology" (rust-lang/cargo#8855)
In support of #7437, this updates the dependency queue implementation to consider a non-fixed cost for each node. The behavior of this implementation should match the previous implementation if all units are assigned the same cost by the code which calls the
queue
method (which is what we do for now).In the future I can think of at least two ways these costs could be used:
cargo build -Ztimings=json
) and use the actual time required to compile a given unit (in milliseconds) as its cost. Any units not included in the provided timing data could perhaps have their cost set to the median cost of all crates included in the timing data.