# Why is fetching dependencies with SwiftPM so slow?

**URL:** <https://forums.swift.org/t/why-is-fetching-dependencies-with-swiftpm-so-slow/67191>\
**Category:** Package Manager\
**Tags:** packagemanager\
**Created:** [September 8, 2023, 7:27pm UTC](https://forums.swift.org/t/why-is-fetching-dependencies-with-swiftpm-so-slow/67191 "2023-09-08T19:27:14Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![SDGGiesbrecht](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/sdggiesbrecht/32/4768_2.png) [@SDGGiesbrecht](https://forums.swift.org/u/SDGGiesbrecht)\
**Post date:** [September 8, 2023, 11:14pm UTC](https://forums.swift.org/t/why-is-fetching-dependencies-with-swiftpm-so-slow/67191/3 "2023-09-08T23:14:17Z")

</div>

> [@taylorswift](#):
>
> is there anything that can be done about this?

See here:

> [@Shallow git clone for CI purposes](https://forums.swift.org/t/shallow-git-clone-for-ci-purposes/25032):
>
> We have a [SPM Package for building the Firebase SDKs for zip distribution](https://github.com/firebase/firebase-ios-sdk/blob/e5fd286b6b66051c7964dbff0fb158ece02209ff/ZipBuilder/Package.swift#L22) and have an internal CI that pull the project and all dependencies every build. I did some digging and saw that [the SPM git clone intentionally does not do a shallow clone](https://github.com/apple/swift-package-manager/blob/7b98bedc91ac8b6581ed6785990ee62c97cde363/Sources/SourceControl/GitRepository.swift#L32) due to the cost of iterative updates. Do other folks think it would be helpful to have a command line flag to do a shallow clone during a SPM build? I assume it could be a parameter of the GitRepositoryProvider initializer and used in the fetch(reposit…

---

_[View the full topic](https://forums.swift.org/t/why-is-fetching-dependencies-with-swiftpm-so-slow/67191)._
