Blog

How uxLens keeps session replay cheap: delta-encoding frames

July 14, 2026 · 4 min read

Every session-replay product has the same cost problem: events (taps, scrolls, navigation) are tiny, but the screenshots needed to actually replay a session are not. If you capture a frame every time the screen could plausibly have changed, most of those frames are byte-for-byte identical to the one before them, a user reading a static screen, a form sitting idle, a list that hasn't scrolled. Uploading and storing all of them anyway is pure waste.

Flagging identical frames on-device

The uxLens Flutter SDK compares each newly captured frame against the last one it actually stored, entirely on the device, before anything is sent anywhere. If the two are identical, the frame's metadata row is still recorded (so the replay timeline stays accurate) but its pixels are never uploaded: the row keeps identical_to_previous = true and storage_key = NULL.

On a real recorded session, this measured roughly a 92% skip rate: only about 8% of captured frames ever needed their pixels sent over the network. Replay reconstructs the screen at any point in the timeline by reusing the last frame that was actually stored, so the viewer never notices the skipped frames were skipped.

Stacking a second cut: JPEG quality

The 8% of frames that do change still cost something, so the SDK also tunes how they're encoded. Session-replay frames are UI screenshots, flat color regions, text, sharp edges, not photographs, so they hold up visually at a meaningfully lower JPEG quality than a photo would. uxLens 0.1.8 lowered the default quality from 50 to 35 for exactly this reason: a further, mostly invisible size cut on top of the frames that survive delta-encoding in the first place.

Both cuts happen entirely client-side. The backend never re-encodes or downscales a frame; whatever quality the SDK chose on-device is the frame's final size. That's a deliberate simplification: it means there's exactly one place that controls image cost, not two systems that could quietly disagree.

Why this matters if you're evaluating a session-replay tool

If a tool's pricing scales with raw session count rather than actual data volume, ask how much of that volume is duplicate pixels you're paying to store. Delta-encoding is a small idea, don't upload what didn't change, but it's the difference between a replay tool that's affordable at scale and one that isn't.