docker-images icon indicating copy to clipboard operation
docker-images copied to clipboard

Speed up sagemath-develop build by saving ccache cache between builds

Open embray opened this issue 9 years ago • 2 comments

A wild-haired idea I just had that could just work: It could also be used in principle for release versions, but it would especially be useful for regular sagemath-develop rebuilds, because from build to build most files won't change or need to be recompiled.

So we could do the builds with ccache, and when the build is complete it could copy the ccache cache out of the docker container and into the workspace on the build machine, for it to copy into docker containers during the normal image build process, so it can reuse the ccache cache between builds.

embray avatar May 20 '16 09:05 embray

On Fri, May 20, 2016 at 02:30:23AM -0700, Erik Bray wrote:

A wild-haired idea I just had that could just work: It could also be used in principle for release versions, but it would especially be useful for regular sagemath-develop rebuilds, because from build to build most files won't change or need to be recompiled.

So we could do the builds with ccache, and when the build is complete it could copy the ccache cache out of the docker container and into the workspace on the build machine, for it to copy into docker containers during the normal image build process, so it can reuse the ccache cache between builds.

Ah, interesting indeed! A variant could be to temporarily mount, during the rebuild, a directory into the containers that would hold the ccache cache.

Cheers,

nthiery avatar May 20 '16 10:05 nthiery

Oh, so mounting / mounting a volume containing the ccache cache. That would probably simpler, yes.

embray avatar May 20 '16 10:05 embray