How WhatsApp Made Key Transparency Work (And Why It Matters)

Image
How WhatsApp's Key Transparency Changed the Game for Encrypted Messaging Okay so let's talk about something actually important for once - how WhatsApp made their encryption more trustworthy without making us jump through hoops. You know how every messaging app claims to be "secure" these days? Well WhatsApp actually put their money where their mouth is with this Key Transparency thing. Let me explain why this matters more than you might think. Visual from their tech docs - looks complicated but trust me it's cool The Big Problem Nobody Talks About So we all know WhatsApp uses end-to-end encryption. Great. But here's the sketchy part nobody mentions - how do you REALLY know you're talking to who you think you are? Like, what if: Some hacker swapped the encryption keys without you knowing? There's a middleman reading your messages right now? The app itself got compromised somehow? Scary stuff right? That's where Key Trans...

Advertisement

DoorDash's iOS Performance Breakthrough: A Case Study in App Optimization

Let me tell you about the time our iOS app got so slow that users could literally say "I'm hungry" three times while waiting for it to load. Not cool for a food delivery app. Here's the messy, real-world story of how Doordash fixed similar Issue.


Our "before" and "after" metrics - that downward slope never looked so beautiful

The Wake-Up Call

It started when their analytics showed:

  • 4.2 second average cold start time (yikes!)
  • 1 in 3 users tapping repeatedly like that would help
  • App Store reviews saying "slow as molasses in January"

Turns out when people want food, they want it NOW. Who knew?

What Was Making them Slow

After digging in with Instruments (and several nervous breakdowns), they found:

  1. SDK Overload: 18 - yes EIGHTEEN - analytics packages loading at launch
  2. Storyboard Spaghetti: UI files so big they made Xcode cry
  3. Eager Beaver Network Calls: Fetching data we didn't need yet
  4. Font Fiasco: Loading every font known to man

Our Performance Fixes

1. The Great SDK Purge

They went full KonMari on our dependencies:

  • Asked "does this spark joy?" to 18 SDKs (kept 6)
  • Made remaining ones load lazily
  • Negotiated with vendors for better init options

Result: 1.3s shaved off immediately. Easy win!

2. UI Intervention

Their views needed therapy:

  • Broke monster storyboards into components
  • Switched some screens to code (yes, it hurt)
  • Pre-warmed frequent views

Result: Another 0.8s faster. Worth the pain!

Code Snippet That Saved Us

This lazy loading pattern became our BFF:

// BEFORE - Loading everything up front like a rookie
func application(_ application: UIApplication, 
                didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    
    Analytics.trackEverything() // Why??
    CrashLibrary.start() // Just in case?
    AdNetwork.init() // They don't even show ads!
    return true
}

// AFTER - Loading smarter like a pro
func application(_ application: UIApplication, 
                didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    
    // Only load essentials
    DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
        ActualImportantSDK.start() 
    }
    return true
}

The Delicious Results

After 3 months of work:

Metric Improvement
Cold Start 4.2s → 1.7s
Warm Start 2.1s → 0.9s
Order Conversion +8% (Cha-ching!)

Lessons for Other Devs

What we learned the hard way:

  • Profile First: We wasted time optimizing the wrong things initially
  • Dependencies Cost More Than You Think: That "tiny" SDK isn't so tiny
  • Users Notice Speed: Our App Store rating went up just from being faster

Read the full technical deep dive on DoorDash's engineering blog - it's surprisingly digestible (pun intended)!

Advertisement