mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #5423] [GUI] the first chat load reads every chat whole (N+1 requests, the full archive in page memory) #3242
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3242
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?
Originally created by @TheHubUser4860938 on GitHub (Nov 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5423
Problem: at every app start,
hydrateChatsfetches every chat file in full - one request per chat, no length cap - to show a list that needs only the index entries. For a heavy user (hundreds of chats, multi-MB each after #5192's long-chat fix) that is hundreds of requests and the whole archive resident in the page before the first paint of the list.Environment: Strata 0.2.11 (app and Terminal 0.2.11, Control and engine 0.1.57) · Linux x86_64 · NVIDIA RTX 4090 24 GB, 125 GB RAM · Qwen3.8-Flash-Next family
Reproduce: start the 0.2.11 app with ~200 chats in
<data>/chats: the network log shows/api/chats(the index) followed by 200/api/chats/<id>reads before the sidebar settles.Expected: the list paints from
/api/chats(which already carries title, updatedAt, bytes, rev); the chat text is read when a chat is opened.Actual:
chat-sync.tsreadAllGETs every entry with parallelism 4 and merges the sessions in memory.Reproduction status: unconfirmed static analysis (the path is
list()->readAllinhydrateChats; the request count follows directly, and we measured the code path, not a 200-chat archive).The merge of "what the host has" against "what this window holds" needs revs, not whole chats; the rev is already in the index entry.
@TheHubUser4860938 commented on GitHub (Nov 6, 2026):
Closing: unconfirmed static analysis. The path (
list()→readAllinhydrateChats) is read from the 0.2.11 code, but no multi-chat start was measured on a real install. Will reopen with a measured request count when one is.