-
Notifications
You must be signed in to change notification settings - Fork 1k
dep status runs significantly slower in a docker container on a mac #1624
Comments
I am guessing that the difference is actually the dep cache in In our FAQ for CI, one option is to preserve the cache directory. What I've seen people do on their local machine is to mount a directory into the container under |
@carolynvs yes mounting the dep pkg dir in the container significantly improved performance. Thanks for the tip. The actual issue I was investigating was whether our jenkins CI would run dep status to verify that package dependencies are in a good state before building. For a variety of reasons, we won't be able to take advantage of the pkg cache during our CI builds. Given how severe the latency is for just 10 packages, its probably not tenable for us to do that in our CI pipeline (time is money or something to that effect) especially since i would expect the latency to increase as the dependency graph grows. Not the end of the world though. Since we put our vendor directory in VCS, we'll just skip dep status. My experience with dep is quite positive over all but the latency is so severe that I don't know how anyone could use this tool effectively if they did not put their vendor directory in VCS. Basically, we treat dep as a "run only as needed" operation and then commit changes including vendored deps into git. Worse case scenario someone might loose 30 minutes every couple of weeks. So I am actually not sure if this counts as a bug. Feature enhancement maybe? Or maybe close it as a dup of all the other performance improvement work being done? |
That is how I use dep, and I don't even have the network as an excuse. It just makes my life easier. 😉 Since there isn't a clear ask, and we have existing issues for improving performance I am going to close this issue. Please leave a comment to reopen if things change! |
I am actually not sure whether this is a bug in dep or a combination of a behavior in dep interacting badly with docker. Running dep status takes 3 seconds on my mac and over 96 seconds in a docker container. The code, including the vendor directory, are identical in both scenarios.
I am running docker on my mac. I have a go package that i build on my mac using go 1.9.2. I also build this go package in a linux docker container on my system. The vendor directory is part of my vcs so the vendor folder is the same in both contexts. I am also using the same version of dep on both my mac and inside the docker container.
The only obvious difference here is that the docker container is a linux filesystem running on top of a linux vm which is in turn running on top of a xhyve hypervisor. But I don't understand why that should have such a severe impact on the performance of dep status, especially since the vendor directory has not changed.
What version of
dep
are you using (dep version
)?What
dep
command did you run?I ran dep status.
What did you expect to see?
The command would complete in a few seconds in a docker container.
What did you see instead?
The command completed in over 96 seconds or longer in the docker container.
The text was updated successfully, but these errors were encountered: