SourceFS: A 2h+ Android build becomes a 15m task with a virtual filesystem
6 months ago
- #Build Optimization
- #Android
- #Virtual Filesystem
- SourceFS is a high-performance virtual filesystem that accelerates Android builds by 9×, reduces compute costs by 14×, and cuts disk usage by 83×.
- Modern device codebases are massive, with Android AOSP having 140M+ lines of code, leading to slow checkouts and builds that waste developer time and increase CI costs.
- SourceFS virtualizes the entire codebase, materializing files on demand, which speeds up checkouts by over 10× and reduces disk space requirements.
- Builds are accelerated by up to 10× through sandboxing and reusing recorded build steps, skipping redundant processes.
- SourceFS integrates seamlessly with existing workflows and tools like Git and Repo, requiring near-zero migration effort.
- Compared to powerful machines, SourceFS on standard hardware delivers better performance and cost savings of up to 14×.
- Alternatives like migrating to new build systems (Bazel, Buck2) or using compiler wrappers (REClient, Goma) are less effective and more complex.
- Future plans include expanding SourceFS support to other operating systems like Yocto and further optimizing performance.