Tagged articles
2 articles
Page 1 of 1
Baidu Geek Talk
Baidu Geek Talk
Sep 20, 2023 · Backend Development

How Baidu Cut iOS App Size by Removing Unused Methods with LLVM Libtooling

Baidu reduced the iOS app package by over 350 MB by discarding dead code, replacing unreliable Mach‑O analysis with a source‑level AST approach built on LLVM libtooling and the Swift compiler, and implementing a multi‑layer static‑analysis pipeline that extracts, transforms, stores, and filters method usage data.

ASTLLVMapp size optimization
0 likes · 17 min read
How Baidu Cut iOS App Size by Removing Unused Methods with LLVM Libtooling
Baidu App Technology
Baidu App Technology
Aug 29, 2023 · Mobile Development

iOS App Package Size Optimization: A Technical Approach

To accurately trim iOS app binaries, the article discards low‑precision Mach‑O/LinkMap methods and instead builds a custom compilation pipeline using libtooling and the Swift compiler to analyze full abstract syntax trees, enabling reliable detection of unused methods across complex language features and inheritance hierarchies.

ASTPackage Sizecode analysis
0 likes · 14 min read
iOS App Package Size Optimization: A Technical Approach