How Meta Reduces FOOMs in the Facebook iOS app
Original post Reducing FOOMs in the Facebook iOS app
Article Summary
Grzegorz Pstrucha and Ali Ansari from Facebook discovered their crash metrics were lying to them. Users kept complaining about crashes that weren't showing up in their logs.
The Facebook iOS team faced a mystery: traditional crash rates were dropping, but App Store reviews told a different story. The culprit was FOOMs (foreground out-of-memory events) that iOS doesn't report through standard crash logging. This deep dive reveals how they detected, measured, and eliminated a class of crashes that's invisible to most monitoring tools.
Key Takeaways
- Built FOOM detection through process of elimination across 6 app termination scenarios
- Migrating from UIWebView to WKWebView produced the biggest OOM reduction
- Eliminating temporary 30MB allocations cut certain scenario crashes by 30 percent
- Created custom in-app profiler tracking all Objective-C object allocations via swizzling
- Small memory leaks significantly impact OOM rates on constrained devices
Facebook reduced invisible out-of-memory crashes by combining detective work to measure the unmeasurable with strategic migrations to iOS 8's WKWebView and aggressive leak prevention.
Continue reading
This page summarizes “Reducing FOOMs in the Facebook iOS app” by Meta, published Aug 24, 2015. All credit for the original work goes to the authors.