PERF: stop rebuilding and transmitting the full chat/task roster on every state push #126
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/a0-symbolics#126
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?
Finding
helpers/state_snapshot.py::build_snapshot_from_request()always materializes completecontextsandtasksarrays, even when the dirty event is only a new log token/progress update for the currently selected chat.helpers/state_monitor.pymay emit state pushes every 25 ms per connected sid while activity continues, and every push rebuilds that full snapshot.The frontend then calls
chatsStore.applyContexts(snapshot.contexts)andtasksStore.applyTasks(snapshot.tasks)on each snapshot even when roster metadata did not change.This makes active streaming cost proportional to total number of loaded chats/tasks, not to the changed context. It also repeats per browser tab.
Current amplification
0.025seconds.build_snapshot_from_request().Direction
Split high-frequency active-context state from low-frequency/global roster state.
Possible protocol shape:
Do not require a polling-style full global snapshot to preserve push compatibility.
Acceptance
contexts/tasks.