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

Updating lockfiles is slow #1696

Closed
crackcomm opened this issue Dec 12, 2022 · 2 comments
Closed

Updating lockfiles is slow #1696

crackcomm opened this issue Dec 12, 2022 · 2 comments

Comments

@crackcomm
Copy link

I wanted to ask if updating lockfiles should be slow (120s~) or maybe I missed some configuration steps?

@illicitonion
Copy link
Collaborator

There's a speed/correctness trade-off you can make here.

The slow part of updating lockfiles is cargo downloading the crates.io index.

You can control whether we will try to re-use your existing $CARGO_HOME/homedir index, or download a fresh one for the repository, using the isolated attribute (or env var).

isolated=True (the default) prefers correctness - a bad/corrupt/whatever clone of the crates index may cause problems, but this is incredibly unlikely.

isolated=False prefers speed at the expense that if you have a bad crates index clone, you may see bad results.

Long-term, we expect to benefit from any improvements to cargo here. In particular, when sparse registries stabilise we expect this to get much better, as we will only have to download the crates you care about, not the entire index, which is increasingly huge.

I'm going to close this issue as "answered", but very happy to continue discussion about workarounds or possible improvements!

@crackcomm
Copy link
Author

That's very informative @illicitonion, I wish I knew about CARGO_BAZEL_ISOLATED earlier when I was was re-pinning a lot during dev.

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

No branches or pull requests

2 participants