paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Dead Code Removal at Meta: Automatically Deleting Millions of Lines of Code and Petabytes of Deprecated Data

Meta 的死代码移除:自动删除数百万行代码与数 PB 废弃数据
FSE Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering2023匹配度 5/10 · 该论文是工业规模程序分析与抽象解释的落地案例,符合用户对工业界应用和问题驱动研究的兴趣;但它聚焦死代码与废弃数据删除,未涉及 LLM/Agent 与静态分析的交叉、浮点程序分析或贝叶斯程序分析,因此与研究画像核心方向仅部分匹配。引用 10 inbox
Will Shackleton, Katriel Cohn-Gordon, Peter C. Rigby, Rui Abreu, James Gill, Nachiappan Nagappan, Karim Nakad, Ioannis Papagiannis, Luke Petre, Giorgi Megreli, Patrick Riggs, James Saindon
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出并落地 SCARF,自动识别并安全删除 Meta 大规模代码库中的死代码与废弃数据。

大型代码库在功能生命周期中会不断积累不再使用的代码和数据,移除它们既有利于用户隐私,也能提升工程效率,但工业界此前缺乏大规模代码废弃与死代码移除的实证。本文提出 SCARF(Systematic Code and Asset Removal Framework),一个面向大型代码库的产品废弃系统,能够识别未使用的代码与数据资产并安全移除,且可全自动执行提交代码、删除数据库表等操作;在无法自动处理时收集开发者输入以推动后续移除。SCARF 在 Meta 已产生重要影响:仅过去一年就跨 1280 万个不同资产移除了数 PB 数据,并删除了超过 1.04 亿行代码。

问题
大型代码库中功能生命周期导致大量不再需要的代码与数据被保留,如何在大规模工业环境中安全、自动地识别并移除这些死代码和废弃资产尚缺乏系统方案。
方法
提出 SCARF 产品废弃系统,自动识别未使用的代码与数据资产并安全删除,包括自动提交代码和删除数据库表;对无法自动处理的场景收集开发者输入以继续推进移除。
评估
在 Meta 生产环境中部署 SCARF,报告其过去一年跨 1280 万个不同资产移除数 PB 数据,并删除超过 1.04 亿行代码。
原文摘要(Abstract)

Software constantly evolves in response to user needs: new features are built, deployed, mature and grow old, and eventually their usage drops enough to merit switching them off. In any large codebase, this feature lifecycle can naturally lead to retaining unnecessary code and data. Removing these respects users’ privacy expectations, as well as helping engineers to work efficiently. In prior software engineering research, we have found little evidence of code deprecation or dead-code removal at industrial scale. We describe Systematic Code and Asset Removal Framework (SCARF), a product deprecation system to assist engineers working in large codebases. SCARF identifies unused code and data assets and safely removes them. It operates fully automatically, including committing code and dropping database tables. It also gathers developer input where it cannot take automated actions, leading to further removals. Dead code removal increases the quality and consistency of large codebases, aids with knowledge management and improves reliability. SCARF has had an important impact at Meta. In the last year alone, it has removed petabytes of data across 12.8 million distinct assets, and deleted over 104 million lines of code.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@inproceedings{ShackletonCR0GN23,
  title = {Dead Code Removal at Meta: Automatically Deleting Millions of Lines of Code and Petabytes of Deprecated Data},
  author = {Will Shackleton and Katriel Cohn-Gordon and Peter C. Rigby and Rui Abreu and James Gill and Nachiappan Nagappan and Karim Nakad and Ioannis Papagiannis and Luke Petre and Giorgi Megreli and Patrick Riggs and James Saindon},
  booktitle = {FSE},
  year = {2023},
  doi = {10.1145/3611643.3613871}
}