-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Use sccache to improve build time #35
Comments
@ErikSchierboom I don't know much of your infrastructure. 1/ the compilation cache from sccache |
@dhovart Currently we do not support external volumes. We might in the future. |
@dhovart Couldn't you build an exercise at Docker build time (as in: in the Dockerfile) that uses all dependencies? I imagine that the compilation cache is then populated and that, when running the image, it will re-use that. |
This may as a side effect allow people to use compile-time heavy crates, e.g. anything |
Can we precompile those? |
I thought that was the point of using sccache, caching the compilation of dependencies. I haven't used it before myself though, so I might be misunderstanding something. |
Oh I don't know much about Rust. What does sccache do exactly? |
It caches build artifacts in a more sophisticated manner than the standard toolchain does. C and C++ are supported too. Currently, every exercise that's submitted is compiled from scratch, including its dependencies. This is both time consuming (costly) and actually prevents some dependencies from being used at all, because they increase build time so much the timeout is triggered. The proposed solution is to use sccache to precompile the dependencies, embed that cache in the docker image and compile submitted solutions through sccache as well. I think this would be very beneficial and hope to find time to pick up the stale PR at some point. (I wonder how much space that cache might take, since we're also talking about reducing the image size atm.) |
Hi, sorry for the PR going stale. Let me know if you'd want me to take this over again. |
That sounds awesome. |
Thanks for your work on this. I actually won't have time to continue working on this one until next week, so feel free to do it if you want to start today! |
sccache can be used to cache built dependencies and improve solutions build time.
I may work on this this week.
The text was updated successfully, but these errors were encountered: