mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2036] Large catalog selectors need cached or paged summary reads #998
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#998
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 @Xelvanis on GitHub (Jun 3, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2036
Originally assigned to: @cha1latte on GitHub.
Problem
Large catalog selectors have summary projections, but the measured selector hot paths are still too slow on large profiles and some selector hooks still request full rows.
Current refactor evidence on
origin/refactor:src/features/catalog/chats/hooks/use-chat-summaries.ts:46-48and:63-65.src/features/catalog/characters/hooks/use-characters.ts:118,:157-160, and:213.src/features/modes/shared/chat-ui/hooks/use-chat-surface-data.ts:264->useCharactersByIds, which calls fullstorageApi.get("characters")atsrc/features/catalog/characters/hooks/use-characters.ts:167.src/features/catalog/connections/hooks/use-connections.ts:34.usePresets, default selection, and default mutation still full-list prompt rows atsrc/features/catalog/presets/hooks/use-presets.ts:179,:223, and:274.usePersonasstill full-lists rows atsrc/features/catalog/personas/hooks/use-personas.ts:57.src-tauri/crates/storage/src/lib.rs:979and do not populate an app-level projected summary cache for repeated selector reads.Scratch large-profile timing on the current Target 2 batch 4 base, using synthetic JSON collections:
1798.17mscold /1681.39mswarm,5,324,581payload bytes.874.68mscold /872.68mswarm,878,891payload bytes.135.01mscold /17.60mswarm, but31,748,766payload bytes.The projected payloads are much smaller, but repeated summary reads still spend near-cold CPU time because the projected path streams/parses each call instead of serving a cached/indexed summary shape. Full-row selector hooks also keep large payload risk alive.
Expected
Selector/list surfaces should be fast on warm large profiles and avoid loading large detail fields until a detail editor or runtime path actually needs them.
Suggested Fix