Airbnb Dec 13, 2021

Airbnb's Page Performance Score on iOS

Article Summary

Airbnb built a unified performance scoring system that works across all platforms. Here's how they instrumented it on iOS to track real user experience at scale.

Nicholas Miller from Airbnb's engineering team breaks down their Page Performance Score (PPS) implementation on iOS. This is part 3 of their series on measuring performance across web and mobile using consistent, user-centric metrics.

Key Takeaways

Critical Insight

Airbnb created a standardized iOS performance tracking system that gives engineers real user metrics without complex instrumentation work.

The article reveals why they chose to track scroll thread hangs differently than you might expect, and includes the specific code patterns that make it work.

About This Article

Problem

Airbnb needed to measure performance across iOS pages with nanosecond precision, but converting between time scales kept introducing casting errors that made the data less accurate.

Solution

Nicholas Miller's team created typealiases for UInt64 nanoseconds and Float64 milliseconds. This forced developers to think explicitly about time scale conversions. They used computed variables to return the current time in milliseconds.

Impact

Engineers can now log performance events without writing their own time conversion logic. This cuts down on implementation errors and gives them consistent millisecond-precision metrics across iOS features.

Recent from Airbnb

Related Articles