Performance
Group send: memoized per-group device list (#824) Every group send previously resolved the full participant device set from scratch — feeding both the phash and the SKDM filter — paying a per-member registry fan-out on every call. After #823 reduced that to 2 cache lookups per participant, a warm send to an 800-member group still cost ~514 µs per send. Topology-validated memo. The resolved (LID-converted) device list is now memoized per group as anArc<Vec<Jid>>. The memo is valid exactly while both conditions hold:
- The cached
GroupInfoArcis still the same pointer (any metadata refresh or membership change produces a newArc, invalidating the memo for free). - The device topology generation is unchanged (any registry write or LID-PN mapping change bumps it).
Arc — not a clone of the full device list.
Enforced-by-construction writes. The topology tracker is fused directly into the write chokepoints:
DeviceRegistryCachewraps the oldTypedCachewith aninsertthat records touched users and aninvalidatethat records the key. DB-fallback cache fills use a separatepromotepath (no bump, since the data is what the DB would have returned anyway).LidPnCache::addrecords both the LID and PN keys, since a mapping change alters which canonical record either key resolves to.
group_devices_memo_enabled flag is set at Client construction based on whether store-backed caches are configured.
Status path unchanged. The status broadcast path builds a fresh GroupInfo per send (no stable Arc identity to memoize against), so it continues to use the unmemoized resolve_skdm_targets path.
Benchmark (release, warm caches, 800 members × 2 devices, back-to-back on the same machine):
No breaking changes. The public API is unchanged. The status send path behavior is untouched.