fetch_messages N+1 across full DB #53
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_archipelagos#53
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
fetch_messagescalledchatmessage_list()(returns every SID in the domain), then issued achatmessage_get()per SID, then discarded messages whoseconversation_siddidn't match. Opening any chat was O(total messages in DB) round trips even though the conversation typically owns a small fraction of them.Fix: switch to the new server-side
ConversationService.list_messages(conversation_sid)RPC in hero_osis (see companion ticket in hero_osis). Client is now a single call that returns the filtered, sorted message list.zaelgohary referenced this issue2026-04-19 08:29:02 +00:00
perf: fetch_messages fetches every message in the DB then filters client-sideto fetch_messages N+1 across full DBzaelgohary referenced this issue from lhumina_code/hero_os2026-04-19 09:26:23 +00:00
Fixed by #56.