-
Notifications
You must be signed in to change notification settings - Fork 413
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
Docker Performance Slow Compared to Brew Installation #822
Comments
This is going to require some benchmarking. In a case like this, I'd try a few things:
Does mockery run slow even after multiple iterations in docker (I wonder if this is a cache issue)? What version of docker are you running? |
Same problem. |
Sadly, this might be somewhat expected. Docker on Macs must run inside of a VM, which is going to incur a noticeable performance penalty. This is what Docker Desktop does under the hood. Although, an order of magnitude is not exactly expected. This might be a factor of how the VM is configured. I cannot debug environment-specific issues like this so I will have to rely on others to identify where mockery is spending most of its time. I bet it is IO related. |
For what it's worth, Docker performance on Linux is much slower as well than running the mockery binary directly for me. Running a mockery Docker container with |
I also have this feeling that when running in a If course running in docker it is expected to be slower, but this seems too much, even the go building don't have this difference in time. I'm seeing if I can discover where this time difference happens, not very easy to do profiling in docker images. |
Description
I'm trying to understand more about why running mockery seems to be so much slower than when run bare metal.
I read through the issue todo and cleaned out my go mod cache.
Mockery Version
v2.46.1
Go Version
go version go1.23.1 darwin/arm64
Installation Method
Steps to Reproduce
You can repro this in the neosync repo.
go clean -modcache
go mod download
mockery
~ 3 secondsdocker run -v "$PWD":/src -w /src vektra/mockery:v2.46.1
~1 minuteI've even tried mounting only what is necessary via:
But the docker run still takes orders of magnitude longer than the bare metal.
Am I missing some form of cache that should be mounted into the docker container?
Expected Behavior
The docker run should be near the speed of the brew installed version.
Actual Behavior
Takes much longer.
The text was updated successfully, but these errors were encountered: