Reducing Bazel's Memory Consumption
summary
Three production ideas target different use cases and tradeoffs: Skyfocus runs today (Bazel 8 flags) and discards state outside a developer-specified working set, showing up to 95% retained-heap reduction for incremental local work; skeletal analysis reorders analysis into a top-down then bottom-up pass to garbage-collect as it goes, early prototypes show about a ~20% peak reduction at the cost of wall time (best for CI/clean builds); analysis caching serializes configured targets and providers to a local or remote backend, showing ~70% analysis-time savings and enabling shared caches and future distributed analysis.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:042023 memory optimizations
- 3:59Acknowledgments
- 4:41New memory reduction ideas
- 8:17Bazel's dependency graph
- 16:48Skeletal analysis for memory
- 19:56Sky Focus for builds
- 22:33Remote analysis caching
- 28:11Distributed analysis
- 29:40Optimization tradeoffs
- 30:02Q&A








