Performance Overhead
Learn about how enabling Session Replay impacts the performance of your application.
If you're considering enabling Session Replay, it's important to first understand the potential performance impact to your app. While accurate metrics require realistic testing where you apply typical access patterns and correlate the results with your business metrics, to provide a baseline, we measured the overhead using the open-source Pocket Casts app.
You can learn more about the various optimizations implemented in the Android Replay SDK in the Replay Performance Overhead docs.
The Pocket Casts app offers a diverse mix of components, including Fragments, Activities, and Jetpack Compose screens, making it an ideal candidate for testing. Here's how the benchmarks were conducted:
- Configuration: Full masking was enabled, and optimized release builds were used.
- User Flow: The same flow was executed 10 times to ensure consistency.
- Real-World Representation: This approach closely mirrors performance in real-world scenarios.
The benchmarks were run on a Pixel 2XL with Android 11.
Below are the results of the benchmarking tests, presented as median values to reflect typical overhead.
Metric | Sentry SDK only | Sentry + Replay SDK |
---|---|---|
FPS | 55 fps | 54 fps |
Memory | 255 MB | 265 MB |
CPU | 36% | 42% |
App Startup Time (Cold) | 1533.35 ms | 1539.55 ms |
Main Thread Time | n/a | 20ms |
Network Bandwidth | n/a | 35 KB |
Jetpack Compose view hierarchies may be slower to snapshot initially due to ART optimizations, compared to the traditional Android View System. But their performance improves as execution progresses.
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").