mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[GH-ISSUE #1021] [Issue]: Memory vault loads slowly because opening it scans the whole vault twice #523
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#523
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 (Sep 21, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1021
Originally assigned to: @Promansis on GitHub.
Summary
Opening the Long-Term Memory vault freezes for about a second. The freeze is largely independent of the selected scope size because the vault is fully scanned twice on open:
/scope-targetscallsstorage.listNotes()with no limit, and/notesthen callsstorage.listNotes()again for the selected scope. EachlistNotes()sequentially reads and parses every JSON file in the vault.Affected package
long-term-memory(1.3.8)Expected behavior
Opening the vault should read and parse the vault at most once per fresh storage state. Selecting a scope with few or no memories should not trigger another full rescan.
Actual behavior
With roughly 300 memories, both the initial
/scope-targetsrequest and the scoped/notesrequest read and parse all vault notes in sequence (storage.ts:232-273). The vault UI blocks while both complete, so the freeze persists even when the selected scope has very few memories. The client then filters, sorts, and renders the full note array, with repeated linear link lookups during search/preview.Steps to reproduce
long-term-memorywith a vault containing a few hundred notes./scope-targetsand/notesboth complete.Environment
builtAgainst)Logs, screenshots, or video
No logs captured; reported behavior is a visible UI freeze.
Additional context
Distinct from #731 (repeated local-character discovery in
/scope-targets, already fixed). The remaining cost is the unboundedstorage.listNotes()call in/scope-targetsplus a second full scan in/notes. Proposed direction: a shared, invalidated vault snapshot inLongTermMemoryStorageso both consumers share one parse, and a single combined vault-data request for the vault open path.Template check