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

Slow build time when using the Docker container #40

Open
maelp opened this issue Oct 14, 2021 · 3 comments
Open

Slow build time when using the Docker container #40

maelp opened this issue Oct 14, 2021 · 3 comments

Comments

@maelp
Copy link

maelp commented Oct 14, 2021

Hi,

thanks for the amazing work on Rust for embedded ESP, I've been successfully using the Docker container to build the code, but the last step of the build (the linking) seems to be very slow, taking perhaps 1h on my recent osX machine,

do you know what could be the cause of this issue? For now this is a bit blocking, because we would love to use a containerized environment for development, but we can't have build times that are more than 1 or 2 minutes for a simple code

@georgik
Copy link
Collaborator

georgik commented Oct 14, 2021

Thanks @maelp for reporting the issue.
The build in container should be fast. Please, can you check Docker settings and verify how many CPUs and memory is allowed for the container?
Long linking time might be caused by:

  • insufficient memory in the container, run diagnostic command: apt-get update && apt install -y htop && htop
  • pushing esp-idf build to mounted volume, alternative can be using docker cp and docker commit
  • insufficient entropy in the container - may cause ssl libraries to stall - type dmesg | tail -n 30 to view details in system log

Try also following command to get more details: docker stats

One alternative on macOS is to use Podman which has same CLI like Docker and it allows much greater control of the container, including mounting USB devices without elevating whole container.

@maelp
Copy link
Author

maelp commented Oct 15, 2021

Thanks @georgik, I tried a build using a VM with more CPU and memory, and it is indeed faster (about 2min to build), which is still somewhat slow, but probably useable

@maelp
Copy link
Author

maelp commented Oct 15, 2021

How long does it take on your setup?

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

No branches or pull requests

2 participants