contacts: N+1 sequential contact_get calls on load #78

Closed
opened 2026-04-20 08:01:03 +00:00 by zaelgohary · 0 comments
Member

archipelago.rs:119-132 (mount) and :229-240 (post-save refetch) serially await contact_get(sid) for every SID returned by contact_list. 20 contacts = 20 sequential RPCs.

Fix: parallelise with futures::future::join_all, same as the messaging fetch_chats / fetch_messages fix in #56.

Follow-up (separate ticket): add a server-side contact_list_all() -> [Contact] batch RPC so this drops to one round-trip.

`archipelago.rs:119-132` (mount) and `:229-240` (post-save refetch) serially await `contact_get(sid)` for every SID returned by `contact_list`. 20 contacts = 20 sequential RPCs. Fix: parallelise with `futures::future::join_all`, same as the messaging `fetch_chats` / `fetch_messages` fix in #56. Follow-up (separate ticket): add a server-side `contact_list_all() -> [Contact]` batch RPC so this drops to one round-trip.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_archipelagos#78
No description provided.