tools / godep

dependency tool for go
http://godoc.org/github.com/tools/godep
BSD 3-Clause "New" or "Revised" License
5.54k stars 454 forks source link

Skip download if ImportPath prefix has been seen #538

Closed sttts closed 6 years ago

sttts commented 7 years ago

The restore code looks up the repo root via vcs.RepoRootForImportPath for each imported package. If there are many (literally hundreds in our case) sub-packages of the same dependency, this code looks up the repo root again and again. If the dependency is on a non-known domain (e.g. k8s.io/kubernetes in contrast to github.com/foo/bar), this leads to one go get per sub-package, i.e. one http connection to get the meta data per sub-package. This is slow, very slow.

ericchiang commented 7 years ago

FYI this change also dramatically reduces the memory usage of godep restore (~3 GB) when using it against the Kubernetes repo.

philips commented 7 years ago

cc @thockin

thockin commented 7 years ago

Good to know, but I won't have time to futz with glide any time soon.

On Apr 28, 2017 11:59 PM, "Brandon Philips" notifications@github.com wrote:

cc @thockin https://github.com/thockin

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tools/godep/pull/538#issuecomment-298151766, or mute the thread https://github.com/notifications/unsubscribe-auth/AFVgVGrAi7ehk13RpzOqsSSEVfZ6u0q1ks5r0t_GgaJpZM4M1U0N .

freeformz commented 6 years ago

I am closing this PR because the repo is going to be archived.