Can you (err... buildcache) cache Rust proc-macros? I've been battling this with sccache and I'm now maintaining a 10-patch deep stack for the next.js build CI.
Windows builds were ridiculously poor on cache hits rates too because of non-determinism that was not able to figure out.
There was an experimental PR that treats proc macros as idempotent with the corresponding colpike speed up. I don't know what happened with it, and stabilization required a lot of design work to not break backcompat. But this is something in the team's radar.
Would it be possible to do somethign like editions for proc macros, or have crates establish "this is a v2 proc macro" or something? There are a lot of things I'd love to see change in a v2 but it'd all be breaking.
I’m not too familiar with Firefox builds. Why are clobber builds common? At first glance it seems weird to add a cache around your build system vs fixing your build system.
Aw shucks, we never thought of that. Here we were, dedicating every one of our developers to speeding up the build, and we never thought to increase our user share instead. In retrospect, that was pretty dumb! Ok, sorry, we'll get right on that.
Seriously, what is with the trend of assuming that anything anyone in a project does, it is assumed that it has been the main goal of the project and all other objectives have been abandoned? "Firefox's frontend designers are doing frontend design work instead of implementing WebUSB which would immediately reverse their declining user share trend and make billions of dollars worth of donations! What are they thinking?!!"
(I'm gonna get a lot of hate for this post, aren't I?)
Post author here. I should've expected these comments, which makes me want to clarify a couple of things.
1. Just because I'm a dev at Mozilla and I got support for buildcache landed in the Firefox repo doesn't make this a Mozilla project. I do this on my own time to help me be more efficient when I actually work.
2. I mainly do this because it's fun. Including the blogging.
3. Sccache is still the compiler cache we're officially developing at Mozilla
Obviously it'll make the developer more efficient to spend more time twiddling his thumbs waiting for his code to compile rather than creating a simple build performance win that allows him to, you know, spend more time improving Firefox. Not to mention all the other developers who stand to benefit from faster builds.
Can you (err... buildcache) cache Rust proc-macros? I've been battling this with sccache and I'm now maintaining a 10-patch deep stack for the next.js build CI.
Windows builds were ridiculously poor on cache hits rates too because of non-determinism that was not able to figure out.
I'd be happy to test it out.
There was an experimental PR that treats proc macros as idempotent with the corresponding colpike speed up. I don't know what happened with it, and stabilization required a lot of design work to not break backcompat. But this is something in the team's radar.
Would it be possible to do somethign like editions for proc macros, or have crates establish "this is a v2 proc macro" or something? There are a lot of things I'd love to see change in a v2 but it'd all be breaking.
1 reply →
Do you have a link for this one? Would love to see it.
1 reply →
what do you mean by idempotent and colpike?
1 reply →
I’m not too familiar with Firefox builds. Why are clobber builds common? At first glance it seems weird to add a cache around your build system vs fixing your build system.
Define “fixing.” If you’re building on ephemeral containers, an external cache is necessary for files that don’t change.
I guess “purge 17% of the code” is not the correct answer?
wow, 17% is impressive with such an easy fix. i wonder if we could just build this as a separate project and pull the webidl files as a dependency.
managing deps as a separate project introduces a lot of day-to-day annoyances, especially if the files are actually changed decently often.
Why compile code when ccache faster
Does ccache fetch compiled code from a central server using checksums?
buildcache, the program the post is about can use a remote server for storing the cache.
sccache can, but most of us don't have access to an sccache instance: https://github.com/mozilla/sccache
2 replies →
So ... perhaps Mozilla should focus on user share dropping.
I understand that speed is relevant, but focusing on that strategy does not really work when dinosaur-like extinction is around the corner.
Aw shucks, we never thought of that. Here we were, dedicating every one of our developers to speeding up the build, and we never thought to increase our user share instead. In retrospect, that was pretty dumb! Ok, sorry, we'll get right on that.
Seriously, what is with the trend of assuming that anything anyone in a project does, it is assumed that it has been the main goal of the project and all other objectives have been abandoned? "Firefox's frontend designers are doing frontend design work instead of implementing WebUSB which would immediately reverse their declining user share trend and make billions of dollars worth of donations! What are they thinking?!!"
(I'm gonna get a lot of hate for this post, aren't I?)
I will just say this: it is unfortunate that you have chosen not to engage with the content of the article.
Post author here. I should've expected these comments, which makes me want to clarify a couple of things.
1. Just because I'm a dev at Mozilla and I got support for buildcache landed in the Firefox repo doesn't make this a Mozilla project. I do this on my own time to help me be more efficient when I actually work.
2. I mainly do this because it's fun. Including the blogging.
3. Sccache is still the compiler cache we're officially developing at Mozilla
Obviously it'll make the developer more efficient to spend more time twiddling his thumbs waiting for his code to compile rather than creating a simple build performance win that allows him to, you know, spend more time improving Firefox. Not to mention all the other developers who stand to benefit from faster builds.
Considering that Firefox mainly appeals to its own contributors, making the developer experience better would be important.