Automating dead code cleanup

Introduced the Systematic Code and Asset Removal Framework (SCARF) with a subsystem for identifying and removing dead code. SCARF combines static and dynamic analysis (leveraging Glean for code dependency graphs and operational logs for API usage) across multiple programming languages (Java, Objective-C, JavaScript, Hack, Python). It operates at a symbol level for granular analysis and automatically generates code change requests via CodemodService. The system has evolved to analyze the complete augmented dependency graph, leading to a significant increase in dead code removal. It also incorporates application-specific semantics and domain-specific logging to fine-tune dependency analysis. SCARF has automatically deleted over 100 million lines of code.
More from the Scalability and Large-Scale Systems Engineering trail
- Open-Sourcing Rebalancer: A Generic, High-Performance Library for Solving Assignment Problems
- ZGateway: Learnings from Putting a Proxy in Front of ZippyDB
- MTIA 300: Meta’s First Training Chip with Built-in NICs and Communication-Offloading Engines
- From User Sequences to Scaling Laws: A Multi-Stage Architecture for Meta’s Ads Ranking
- GEM Training: How Meta Doubled the Efficiency of Its LLM-Scale Ads Foundation Model