Remote Caching POC #1400
Replies: 6 comments 1 reply
-
Hey @psilospore , great news! I very much like the idea to only cache what's inside mills Caching based on time: Two aspects here, upload and download: For upload you suggested to only upload the cache if the exec time exceeded a threshold. Makes sense. For dowload I could also imagine some concurrent strategy, use whatever return first, download or local computation. While upgrading zinc support in mill, I recognized that zinc itself has some remote caching features. I haven't explored how this works but my comment pointed out the place where we need to hook in, if we want to use it in mill. I can't tell how this would or should work with your approach, but it is clearly limited to compilation targets. One thing to note though: Mills cache is very sensitive to changes in the build setup, e.g. one small change in the
If we only support one cached value per coordinate, each run from the other developer will invalidate the remote cache making things worse than without any caching. And one last thought. Ideally, the remote cache can be used locally by a single developer, just to speed up tasks like switching branches or bisecting etc. To name an existing tool: ccache does exactly that in c/c++ land. And now one implementation idea: The workhorse to hold hashes and detect changes in mill is |
Beta Was this translation helpful? Give feedback.
-
Maybe a prerequisite would be to invalidate less when the build changes? I'm not sure if it's sound but the naive assumption would be that only tasks whose code changed (including methods it calls etc.) should be invalidated. I don't know how you would detect that though. |
Beta Was this translation helpful? Give feedback.
-
When relying on |
Beta Was this translation helpful? Give feedback.
-
Hey sorry all I ended up getting really busy but also am doing less Scala these days. I probably won't be working on this. I would love for someone to pick this up and would be happy to answer any questions about my proof of concept. |
Beta Was this translation helpful? Give feedback.
-
hey @psilospore / @lefou, I found Mill via GitHub's dependency graph support and I'm quite interested in trying it out. I'm the author of Buildless, so of course I'm always looking to add remote caching support where we can. We'd love to support Mill and I'm happy to (try) to help get this PR over the line. Do you guys recall what was needed? Cheers and thanks for any guidance. |
Beta Was this translation helpful? Give feedback.
-
Hey all,
I'm interested in returning to my Proof of concept PR to add Remote Caching: #726 However I wanted to ask some questions and get feedback before I return to it.
Outside of what was mentioned in the PR description and the readme in: https://github.com/psilospore/mill-remote-cache-server
Based on the comments in the original PR I was planning the following:
T.noRemoteCache
this would be the opposite ofT.remoteCached
that @lihaoyi proposed. The reason why I may not want opt-in caching is that without the concern of small tasks taking longer to fetch than compute (by the time based limit) and caching-only relative to project targets we don't need to pick what targets would be worth it to cache.The other main question I have is based on this comment I'm not sure if that seems like a completely different approach or how I would use that. Would anyone be able to share more on that?
Beta Was this translation helpful? Give feedback.
All reactions