-
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
Revert "Disable preserving mtimes on archives" #7935
Revert "Disable preserving mtimes on archives" #7935
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. |
The technical bits look good to me here, but I agree with @ehuss on the request for performance numbers if we can |
This reverts commit 8c92e88.
e07687d
to
25b90e7
Compare
To roughly test performance, I'm running Cargo release build off of master (no mtime calls):
Cargo release build off of my branch (with mtime calls):
So in this quick an dirty test it seems like performance on this one project got about 13% worse. I'm not sure what is tolerable for this sort of thing, so I'll leave that up to discussion. Let me know if you want me to test on any other systems. |
To me, the 13% performance loss is strong evidence that we should add some way to let users opt into the mtime-lossy system.
But the 13% performance loss does not serve as evidence that we should continue to make the mtime-lossy behavior the default, given that we have crate authors stating that their bulld scripts are relying on mtime preservations. |
The Cargo team briefly discussed this, and I've been doing some more testing. Since this only affects downloading new crates, generally the performance hit is lost in the noise. Although we still contend that relying on mtime in a build script is a bad idea, it doesn't seem important enough to stop people from trying. On SSD setups, the "extraction" phase barely registers in my testing. However, on my desktop machine with a magnetic HD, I see it taking a huge amount of time (a If we really want to improve extraction time, one option is to make extraction run in parallel with downloading. I tried to implement this a couple years ago, but it is very difficult due to the way Cargo's download system works. I'm uncertain if refactoring all that code would be justified since it is already pretty tricky. @bors r+ |
📌 Commit 25b90e7 has been approved by |
☀️ Test successful - checks-azure |
Update cargo Update cargo 21 commits in bda50510d1daf6e9c53ad6ccf603da6e0fa8103f..7019b3ed3d539db7429d10a343b69be8c426b576 2020-03-02 18:05:34 +0000 to 2020-03-17 21:02:00 +0000 - Run through clippy (rust-lang/cargo#8015) - Fix config profiles using "dev" in `cargo test`. (rust-lang/cargo#8012) - Run CI on all PRs. (rust-lang/cargo#8011) - Add unit-graph JSON output. (rust-lang/cargo#7977) - Split workspace/validate() into multiple functions (rust-lang/cargo#8008) - Use Option::as_deref (rust-lang/cargo#8005) - De-duplicate edges (rust-lang/cargo#7993) - Revert "Disable preserving mtimes on archives" (rust-lang/cargo#7935) - Close the front door for clippy but open the back (rust-lang/cargo#7533) - Fix CHANGELOG.md typos (rust-lang/cargo#7999) - Update changelog note about crate-versions flag. (rust-lang/cargo#7998) - Bump to 0.45.0, update changelog (rust-lang/cargo#7997) - Bump libgit2 dependencies (rust-lang/cargo#7996) - Avoid buffering large amounts of rustc output. (rust-lang/cargo#7838) - Add "Updating" status for git submodules. (rust-lang/cargo#7989) - WorkspaceResolve: Use descriptive lifetime label. (rust-lang/cargo#7990) - Support old html anchors in manifest chapter. (rust-lang/cargo#7983) - Don't create hardlink for library test and integrations tests, fixing rust-lang/cargo#7960 (rust-lang/cargo#7965) - Partially revert change to filter debug_assertions. (rust-lang/cargo#7970) - Try to better handle restricted crate names. (rust-lang/cargo#7959) - Fix bug with new feature resolver and required-features. (rust-lang/cargo#7962)
This reverts commit 8c92e88.
Fixes #7590