Skip to content

Conversation

arlosi
Copy link
Contributor

@arlosi arlosi commented Jul 6, 2022

The is_yanked check performed by cargo install and cargo package was running sequentially (calling block_until_ready after every check).

This change makes is_yanked return Poll<> and runs the check in parallel, which gives better performance for cargo install --locked and cargo package when using a sparse registry.

fixes #10821
r? @ehuss

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 6, 2022
Copy link
Contributor

@Eh2406 Eh2406 left a comment

Choose a reason for hiding this comment

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

Looks good.

Is there some way to test this?

@arlosi
Copy link
Contributor Author

arlosi commented Jul 6, 2022

Is there some way to test this?

I'm not sure of a good way to verify that the dependencies are downloaded in parallel. From a functional standpoint, it was working correctly downloading them serially, but it was unnecessarily slow.

@Eh2406
Copy link
Contributor

Eh2406 commented Jul 7, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Jul 7, 2022

📌 Commit 72ed97b has been approved by Eh2406

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 7, 2022
@bors
Copy link
Contributor

bors commented Jul 7, 2022

⌛ Testing commit 72ed97b with merge bc28260...

@bors
Copy link
Contributor

bors commented Jul 7, 2022

☀️ Test successful - checks-actions
Approved by: Eh2406
Pushing bc28260 to master...

@bors bors merged commit bc28260 into rust-lang:master Jul 7, 2022
bors added a commit that referenced this pull request Jul 8, 2022
Refactor check_yanked to avoid some duplication

Follow up from #10830

r? `@ehuss`
weihanglo added a commit to weihanglo/rust that referenced this pull request Jul 10, 2022
…79e13a071ad4b17435bd6bfa4c

2022-07-03 13:41:11 +0000 to 2022-07-09 14:48:50 +0000

- Mention `[patch]` config in "Overriding Dependencies" (rust-lang/cargo#10836)
- Update terminal-width flag. (rust-lang/cargo#10833)
- Refactor check_yanked to avoid some duplication (rust-lang/cargo#10835)
- Fix publishing to crates.io with -Z sparse-registry (rust-lang/cargo#10831)
- Make `is_yanked` return `Poll<>` (rust-lang/cargo#10830)
- Fix corrupted git checkout recovery. (rust-lang/cargo#10829)
- add a cache for discovered workspace roots (rust-lang/cargo#10776)
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 10, 2022
Update cargo

7 commits in c0bbd42ce5e83fe2a93e817c3f9b955492d3130a..b1dd22e668af5279e13a071ad4b17435bd6bfa4c
2022-07-03 13:41:11 +0000 to 2022-07-09 14:48:50 +0000

- Mention `[patch]` config in "Overriding Dependencies" (rust-lang/cargo#10836)
- Update terminal-width flag. (rust-lang/cargo#10833)
- Refactor check_yanked to avoid some duplication (rust-lang/cargo#10835)
- Fix publishing to crates.io with -Z sparse-registry (rust-lang/cargo#10831)
- Make `is_yanked` return `Poll<>` (rust-lang/cargo#10830)
- Fix corrupted git checkout recovery. (rust-lang/cargo#10829)
- add a cache for discovered workspace roots (rust-lang/cargo#10776)
@ehuss ehuss added this to the 1.64.0 milestone Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"cargo install --locked" very slow with sparse-registry
5 participants