Post

A week on and it's still working well; it required a gopls change (go.dev/cl/795221, hope that's released soon!). With 5 day pruning like Go does itself, that 5 day window leaves me sitting at about 150GB of cache, which comes out to about 20GB on disk. Very good!

Jake Bailey@jakebailey.dev

Did a bit of hacking this weekend and cooked up "gocachez", a GOCACHEPROG which transparently compresses the Go build cache to save disk space at rest at the cost of CPU, with fairly good results. Building and testing TS would normally eat up roughly 4GB, but with gocachez it's only about 400MB.

0 reposts12 likes

Awesome. Strong work. I am left wondering whether some parts should be selectively compressed within the files themselves via toolchain rather than externally. It'd be nice for this to Just Work for everyone out of the box...

Yep, that's roughly github.com/golang/go/is... though I haven't personally audited every cached file Most are inputs to tools that expect uncompressed data. When Go gets zstd I feel like a lot of this is fair game. I'm using the lowest compression level and the low memory option and it's very good

github.comcmd/go: compress GOCACHE · Issue #76337 · golang/goNo template fit, forgive my use of the empty issue template. In the typescript-go project, I and others on the team keep accidentally running ourselves out of disk space (or, running CI runners out...