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

Slow initialization on each invocation #607

Open
epage opened this issue Nov 29, 2022 · 1 comment
Open

Slow initialization on each invocation #607

epage opened this issue Nov 29, 2022 · 1 comment
Labels
bug Not as expected

Comments

@epage
Copy link
Collaborator

epage commented Nov 29, 2022

When looking into #605, I noticed that it took a couple seconds before any output was given.

@epage epage added the bug Not as expected label Nov 29, 2022
@epage
Copy link
Collaborator Author

epage commented Nov 29, 2022

After some investigation, I found that cargo package --list is taking about 100ms per package in a workspace. This happens even if we skip the package and even if the specific step doesn't care about cargo package --list.

I tried throwing rayon at it but it only offered minor gains. I'm assuming we are either saturating IO or dealing with lock contention. For project-specific lock files, I tried putting each invocation in a temp CARGO_TARGET_DIR but that didn't do anything. I did notice that the rayon output shows that its blocking on the package cache. I'm unsure if that is the main blocker or not. If It is, I'm a bit surprised and wonder if the scope of that lock is bigger than it should be but nothing stood out to be from browsing cargo's source code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not as expected
Projects
None yet
Development

No branches or pull requests

1 participant