mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[GH-ISSUE #1268] [Issue]: Memory Vault takes seconds to open because place pickers recompute memory presence every render #648
Labels
No labels
agent: chess
agent: conversation-calls
agent: eightball
agent: haptic
agent: hierarchical-maps
agent: hierarchical-maps
agent: illustrator
agent: poker
agent: rock-paper-scissors
agent: tic-tac-toe
agent: uno
artifacts
bug
bugfix
build
catalog
ci
client
dependencies
docs
documentation
enhancement
feature
fixed-in-staging
in-pr
normal-scope
packages
pull-request
qol
regression
roadmap
scope-risk
server
soup
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Agents#648
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 @Promansis on GitHub (Oct 8, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1268
Originally assigned to: @Promansis on GitHub.
Summary
The Memory Vault takes several seconds to appear every time Long-Term Memory opens and every time you switch back to the Vault tab. The server answers quickly. The time goes into the browser recomputing the two place pickers on every Vault render.
Affected package
long-term-memory (1.4.15)
Expected behavior
The Vault should open and redraw quickly, and its render cost should not grow with the number of saved memories multiplied by the number of chats, branches, characters and personas.
Actual behavior
Each
ScopeTargetPicker(primary and secondary place) sorts every place into "With memories" and "No memories". It runsltmScopesOverlapagainst every memory scope in two separate filters (MemoryVault.tsxaround lines 305-316). Both pickers sit inside<details>that are closed by default, but their contents are still built on every Vault render.Measured on a real library (553 chats including 504 branches, 65 groups, 160 characters, 12 personas, 182 memories):
/status,/drafts/pending-count,/settings,/scope-targets?includeAllChats=true,/notes)./scope-targetsdata with the realltmScopesOverlap: 790 places per picker, 517,548 overlap calls and roughly 850-940 ms per Vault render.findIndexinsidefilter(quadratic, about 80 ms on this data).Steps to reproduce
Environment
Logs, screenshots, or video
Timings above come from read-only requests to the live server and an offline replay of the picker logic. No private chat data is included.
Additional context
Planned fix: work out memory presence once per place in a single pass, cache it between renders and share it between both pickers, and de-duplicate the place lists with a
Set. Grouping, labels and selection behavior stay the same.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: