How Hotstar Prevents Performance Regressions on iOS Apps
Original post Preventing Performance Regressions on iOS Apps
Article Summary
JioHotstar was stuck in a frustrating cycle: fix performance issues, ship the update, watch them resurface weeks later. Sound familiar?
Saurabh Kapoor from JioHotstar shares how his team broke the performance regression cycle. They moved from reactive firefighting to proactive detection, testing performance changes before they reach millions of users.
Key Takeaways
- First attempt with Instruments and xctrace failed: 20 seconds generated 200MB files
- XCTMetric framework tracks CPU, memory, hitches, and network without custom tooling
- Performance tests only work on physical devices, not simulators
- Built custom parser using xcresulttool to extract metrics and create baselines
- enablePerformanceTestsDiagnostics flag generates memgraphs and ktrace files automatically
Automated performance testing using XCTest metrics and custom parsing caught regressions before users noticed, ending the fix and repeat cycle.
Continue reading
What This Article Covers
JioHotstar's initial xctrace approach created massive files that were hard to manage. A 20-second test generated 200MB of data, and longer tests reached several gigabytes. The traces were inconsistent and incomplete, which made it difficult to store the data and identify root causes.
The team switched to the XCTMetric framework and used specific metric types like XCTCPUMetric, XCTMemoryMetric, and XCTOSSignPostMetric. They built a custom parser with xcresulttool to pull metrics from xcresult files and establish performance baselines.
Enabling the enablePerformanceTestsDiagnostics flag in xcodebuild automatically generated memgraphs and ktrace files. These files gave developers detailed visibility into memory usage and performance events, making it easier to spot which code changes caused performance regressions.
This page summarizes “Preventing Performance Regressions on iOS Apps” by Hotstar, published Dec 12, 2025. All credit for the original work goes to the authors.