Skip to content
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

Run with docker extremely slow #369

Closed
dustin-graham opened this issue Mar 7, 2021 · 4 comments · Fixed by #548
Closed

Run with docker extremely slow #369

dustin-graham opened this issue Mar 7, 2021 · 4 comments · Fixed by #548

Comments

@dustin-graham
Copy link

Hello. Thank you for this great tool! I previously used this tool via Homebrew installation. However, since I upgraded to Go 1.16 it became incompatible with my dev setup. As a result, I chose to start using it via Docker. However, I found that executing this tool via docker is extremely slow. It takes about 3 minutes to generate the interface I provide via --name --recursive. I'm not sure how to remedy this. If you have any hints as to why it may be executing so slowly, please let me know.

@LandonTClipp
Copy link
Collaborator

Some other folks recently submitted a PR to build mockery with go 1.16. Hopefully this will fix your problem, let me know if you continue to have issues.

@simplylizz
Copy link

It seems that the problem is still here.

v2.7.4:

  • locally installed - 2 minutes;
  • installed in Docker - 7 minutes (ran it twice in the same container to ensure that it's not a matter of cache or something like this, result was the same);

@SVilgelm
Copy link
Contributor

SVilgelm commented May 2, 2021

@dustin-graham @simplylizz I'm facing same issue with other tools, like golangci-lint and etc..., especially in case when there are many other containers are running at same time. You can try to stop other container and run only mockery or try to give more resource in the docker settings.
I really tried different ways and didn't find a good solution.

@dustin-graham Could you please give a bit more details about this:

However, since I upgraded to Go 1.16 it became incompatible with my dev setup.

I'm using mockery with go1.16 and no problems, except on Mac with M1 chip, but it's not because of go's versions.

@DeadlySurgeon
Copy link

DeadlySurgeon commented Dec 21, 2021

This is still an issue, and on the M1 chips it reaches an OOM and potentially crashes Docker. It needs to be compiled and pushed out for that arch, especially as more people are being forced on the M1 platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants