Eureka
I was able to reproduce the issue with a simple 30 hello worlds within our repository, building it the same way we build our own module.
Building the hello worlds outside the repo would take about ~1 second without extraction of the bazel binary and starting up blaze.
Building it within the repository just with regular bazel build has a similar result and the same for building within the docker that is being used to build our own module.
For reasons, we try to have as little bazel in the front end as possible so we have a 'make' wrapper around bazel itself. Using that to build the hello world package takes a
whopping 44 seconds. Compiling a single hello world source file takes up to 6 seconds. So i'll look into how the wrapped is calling bazel and where the problem lays.
Furthermore the profile doesnt show any major gaps when being build without a remote cache, everything is nice and lined up just like when building with drake.
It is when a remote cache is being used that there is unspecified time during the ACTION_EXECUTION phases. Although the drake build didnt seem that affected by the remote cache
i might have missed a detail when building it so i will look into that again.
With some more building and thinking, i concluded that it is probably the combination of using a docker and using remote cache what causes the gaps.
I will keep this thread updated if i find out more.
Kind regards,
Henning