Open
Description
RUN MAKE="make -j$(nproc)" bundle install && \
This will parallelize compilation for gems with native extensions.
I tested this with our Rails app on my laptop (Macbook M3 Pro):
- default (no parallelization): ~112 seconds for the
bundle install
step - with 2 CPUs: ~85 seconds
- with 4 CPUs: ~64 seconds
We could make this configurable to play it safe, but I don't think there's much upside to not doing this.
(Also, bundle has its own --jobs
argument, but it didn't seem to make any noticeable difference when I tried it. I assume the GVL prevents bundle from being able to truly parallelize work.)
Metadata
Metadata
Assignees
Labels
No labels