-
Notifications
You must be signed in to change notification settings - Fork 445
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
feature: use sscache to improve incremental compilation time for rust jobs #4369
Comments
Im not sure if sccache will help with incremental compilation. It helps with rebuilding entire project alot, but is not that effective when incrementally rebuilding project with small changes. Sccache caches artifacts, but when we make a change, than produced artifact changes as well and sccache can not provide that new artifact and cache miss occurs. I think the best way to improve comptime speed is to use nightly rust with optimization flags and cranelift as a backend. Still tho approach with sccache should be checked. |
btw did you mean |
Yes I mean sccache. The reason I thought sccache was useful is in the case where the imports are the same and you did a minor change in your main function. Yes you will need to recompile main but not the imports (but that I'm not sure) |
Unless these imports are using generics or input data changed (e.g. env variable used to compile subcrate), rust will skip recompilation of those by default. sccache is usually useful only on clean builds. Where rust is smart enough to skip rebuilding same artifacts. If something recompiling, than its more likely that the produced artifact will be different, thus sccache can not provide needed cache. |
It is still useful to have sccache for cold starts |
@pyranota I think you're forgetting that in Windmill, every job has an ephemeral folder and the target of cargo is part of that. So unless I'm mistaken, because the target is deleted after the job, for every job it needs to recompile from start because lack of target folder. sccache primary purpose would be to cache globally those. |
No description provided.
The text was updated successfully, but these errors were encountered: