Files
buzz/mobile/lib
Tom Brow 3f789d16b8 perf(mobile): subscribe to presence only for people on screen
The presence cache subscribed to every kind:20001 heartbeat in the
community and dropped the ones it wasn't tracking. On Block's Builderlab
that is about 27 events a second, roughly 3 MB every 5 minutes (35 MB an
hour) while the app is open, each one decoded and verified, to show
presence for a few DM partners and open profiles.

Subscribe with `authors` set to the tracked keys instead. Tracking a new
key replaces the subscription with a wider one, opening the new one before
closing the old, and reads the new key's snapshot once the subscription
covers it. With nothing tracked there is no subscription.

Signed-off-by: Tom Brow <tomb@squareup.com>
2026-11-12 20:47:10 -08:00
..