Product Benefits Pricing Guides Docs About Contact us Try it out
Performance

PostHog iOS GPU Replay Capture Tracking

Track PostHog iOS GPU replay capture to measure main-thread cost, memory use and replay quality before you switch the experimental mode on.

· 3 min read

Session replay is useful, but every screenshot your app captures costs something. On iOS, much of that work happens on the main thread, the same thread that draws your interface and handles taps. If capture is heavy, users feel it as dropped frames and slow screens, and your analytics tool becomes part of the performance problem.

On 20 November 2026, PostHog added an experimental, opt-in GPU screenshot capture path for iOS and Mac Catalyst. It aims to reduce main-thread capture work. It is off by default and uses more memory, which is a trade-off you should measure rather than guess.

Why This Matters

Without a baseline, you cannot tell whether a new capture mode helps or hurts. A smoother main thread is no good if the extra memory pushes older iPhones into termination. And a faster capture is no good if replays come out blank or mis-masked.

If you flip the switch for everyone and watch only crash totals, a small regression can sit unnoticed for weeks.

Data Points to Track

Log these properties against sessions and on a lightweight replay_capture_health event, using your own naming:

  • replay_capture_mode: default or gpu
  • sdk_version and app_version
  • device_model and ios_version
  • main_thread_capture_ms: average time spent capturing per snapshot
  • hang_count: main-thread stalls longer than 250 ms in the session
  • dropped_frame_rate during replay-enabled screens
  • memory_footprint_mb at session start and at its peak
  • memory_warning_count
  • termination_reason: none, memory or other
  • blank_snapshot_count
  • session_replay_enabled: true or false

Keep values numeric or categorical. Do not log screen content.

Setup Steps

  1. Update the PostHog iOS SDK to a release that includes the GPU capture option and read its notes for the exact setting name.
  2. Record replay_capture_mode as a property on every session, even when it is the default.
  3. Add the performance properties above using MetricKit or your existing performance tooling.
  4. Use a feature flag to enable GPU capture for a small share of sessions, such as 5%, keeping the rest on the default path.
  5. Make sure the split is random across device models so older phones appear in both groups.
  6. Compare the two groups for at least one full release cycle.
  7. Build a dashboard of hangs, memory and terminations by capture mode and device model.

Actionable Insights

Main-thread cost. If main_thread_capture_ms and hang counts fall in the GPU group, the mode is doing its job. If they stay level, the extra memory buys you nothing.

Memory headroom. Watch peak memory and memory warnings on older devices first. A rise there is the early sign of terminations.

Replay quality. Rising blank snapshots mean you are trading usable replays for speed. Check a sample of sessions by eye as well as by count.

Device segmentation. A mode that suits recent phones may not suit older ones. Consider enabling it only for device groups where it wins.

Rollout decision. Set your thresholds in advance, such as no increase in terminations and a clear drop in hangs, and let the data decide whether to expand.