avast / pytest-docker

Docker-based integration tests
MIT License
427 stars 71 forks source link

Performance impact of pytest/subprocess on docker services? #56

Closed nejch closed 2 years ago

nejch commented 4 years ago

Hi all, just wanted to check if anyone else has seen any significant performance effects on container spin-up and runtime.

I recently switched from a plain shell script spinning up a container to docker-compose using pytest-docker. It's quite a heavy app (a GitLab CE container that does a full reconfigure on every startup), so it already took around 2 minutes to get up and running for tests before, but now it's more like 3 minutes (at least on underpowered CI VMs), and some time-sensitive tests seem to be struggling, so more wait-time might need to be added.

I understand that both pytest and subprocess do a lot more under the hood which probably contributes, but I didn't expect such a big difference, but maybe I'm also doing something wrong :)