Performance
GroupInfo: reverse PN→LID index derived and no longer persisted (#810)
GroupInfo (in wacore) previously kept two parallel maps — lid_to_pn_map (LID user → phone Jid) and pn_to_lid_map (phone user → LID Jid) — and both were serialized into every group_metadata cache blob. Because pn_to_lid_map is a pure function of lid_to_pn_map, this doubled the mapping bytes in both the in-memory 250-entry TTL cache and on disk.
The reverse index is now:
HashMap<CompactString, CompactString>(LID user string stored inline, not aJid).#[serde(skip)]— absent from serializedgroup_metadatablobs. Old blobs that carrypn_to_lid_mapstill decode correctly;serde_jsonignores the unknown field and the index is rebuilt from the forward map on deserialize.- Rebuilt on deserialize via a
GroupInfoDeshadow struct, soquery_infowarm-cache lookups always have a valid reverse index without any extra I/O.
group_metadata.
Breaking changes
lid_jid_for_phone_user → lid_user_for_phone_user, returns Option<&CompactString>
phone_device_jid_into_lid) reconstructs the Jid::lid on demand — the new API avoids pre-allocating N Jids per GroupInfo build while keeping the same behaviour for callers.
lid_to_pn_map() accessor removed
The lid_to_pn_map() -> &HashMap<CompactString, Jid> method had zero external callers and is removed. Use phone_jid_for_lid_user(lid_user) to look up individual entries.