Skip to content
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

Less copying during dist installation #1744

Merged
merged 1 commit into from
Apr 14, 2019
Merged

Conversation

rbtcollins
Copy link
Contributor

Per #904 copying the contents of dists out of the extracted staging
directory and then later deleting that same staging directory consumes
60s out of a total of 200s on Windows.

Wall clock testing shows this patch reduces
rustup toolchain install nightly from 3m45 to 2m23 for me - including
download times etc.

I'm sure there is more that can be done, thus I'm not marking this as
a closing merge for #904.

Per rust-lang#904 copying the contents of dists out of the extracted staging
directory and then later deleting that same staging directory consumes
60s out of a total of 200s on Windows.

Wall clock testing shows this patch reduces
`rustup toolchain install nightly` from 3m45 to 2m23 for me - including
download times etc.

I'm sure there is more that can be done, thus I'm not marking this as
a closing merge for rust-lang#904.
Copy link
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Over all, I think this looks good. I like the cleanup for dest_abs_path() and the copy-vs-move semantics seem sound to me.

If at all possible, I'd love to see if @brson has enough memory of this code area to comment, otherwise given the tests are green I'm okay for merging this.

@kinnison
Copy link
Contributor

I can confirm that this branch has been working fine for me in local testing for 2 days.

Copy link
Member

@nrc nrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@nrc nrc merged commit 88364b1 into rust-lang:master Apr 14, 2019
@rbtcollins rbtcollins deleted the lesscopies branch April 14, 2019 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants