-
Notifications
You must be signed in to change notification settings - Fork 1.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
Long cache retrieval when resolving dependencies #8123
Comments
I assume you mean "package" not "packet". But yes, it's actually doing a git clone and checkout from the cache which is a very expensive operation. |
Yes, I made a typo. |
I think we're probably at the point where we're doing the best we can. SwiftPM does a complete git clone into the user cache under .swiftpm/cache/repositories. We need that so we have all the versions available during dependency resolution and allows you to have multiple projects using different versions. We then do a shallow clone of the selected revision over to the package scratch directory. One second to do is about as fast as git can go. The solution we're hoping for is the previous work with package registries where the registry would have the metadata we need and a source archive for each available version. Then we can cache those which would be much faster. But I'm not sure when a community wide solution for that will happen. |
@dschaefer2 I spent some more time on the benchmark: If you delete everything in the |
Description
SPM dependency resolution takes a very long time to extract. Each package* takes on average ~1 second to extract.
As I understand it, the problem is that the cache is stored in a compressed form and takes time to extract. But it seems to me that this is of less practical use than a faster resolution.
I would like the user cache to store the original artifacts (the same as in the local .build directory)
The text was updated successfully, but these errors were encountered: