[GH-ISSUE #731] [Issue]: Long-Term Memory loading blocks on repeated local-character discovery #374

Closed
opened 2026-10-20 17:26:59 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Promansis on GitHub (Sep 6, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/731

Originally assigned to: @Promansis on GitHub.

Summary

Long-Term Memory memories and sources loading became slow in package 1.2.20 and remains slow in 1.2.21 and 1.2.22. The /scope-targets endpoint rebuilds local-character catalogs per eligible Roleplay chat and repeatedly scans overlapping source text.

Affected package

long-term-memory

Expected behavior

Initial Memories and Sources loading should remain responsive at the 1.2.19 baseline, including installations with many chats and overlapping scopes. Optional local-character discovery must not block ordinary loading.

Actual behavior

With 30 chats sharing a group and 100 source notes, the committed handlers measured about 1 ms warm in 1.2.19 and about 3.4 seconds in 1.2.20-1.2.22, even with storage and host I/O replaced by in-memory fixtures. A zero-delay timer was blocked for about 3.5 seconds. The same 100 sources were parsed 3,000 times across 30 catalogs.

Steps to reproduce

  1. Open Long-Term Memory from a Roleplay chat while all-chat scope targets are enabled.
  2. Use an installation with multiple chats sharing groups or character-scoped memories.
  3. Compare /api/long-term-memory/scope-targets?chatId=<id>&includeAllChats=true against package 1.2.19 and current releases.

Environment

  • Marinara Engine version: 2.4.1-compatible package source
  • Package version: 1.2.20-1.2.22 regression range
  • Install type: source fixture reproduction
  • OS + version: Linux
  • Browser or app shell: N/A for server fixture

Logs, screenshots, or video

No private data included. The investigation measured release handlers with schema-valid synthetic fixtures and confirmed the regression in committed versions.

Additional context

1.2.21 reduced repeated vault reads but did not remove repeated catalog computation. 1.2.22 did not change the generated server bundle relative to 1.2.21. The fix should preserve local-character family isolation and ambiguity handling while making ordinary loading independent of optional source-body discovery.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Sep 6, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/731 Originally assigned to: @Promansis on GitHub. ## Summary Long-Term Memory memories and sources loading became slow in package 1.2.20 and remains slow in 1.2.21 and 1.2.22. The `/scope-targets` endpoint rebuilds local-character catalogs per eligible Roleplay chat and repeatedly scans overlapping source text. ## Affected package `long-term-memory` ## Expected behavior Initial Memories and Sources loading should remain responsive at the 1.2.19 baseline, including installations with many chats and overlapping scopes. Optional local-character discovery must not block ordinary loading. ## Actual behavior With 30 chats sharing a group and 100 source notes, the committed handlers measured about 1 ms warm in 1.2.19 and about 3.4 seconds in 1.2.20-1.2.22, even with storage and host I/O replaced by in-memory fixtures. A zero-delay timer was blocked for about 3.5 seconds. The same 100 sources were parsed 3,000 times across 30 catalogs. ## Steps to reproduce 1. Open Long-Term Memory from a Roleplay chat while all-chat scope targets are enabled. 2. Use an installation with multiple chats sharing groups or character-scoped memories. 3. Compare `/api/long-term-memory/scope-targets?chatId=<id>&includeAllChats=true` against package 1.2.19 and current releases. ## Environment - Marinara Engine version: 2.4.1-compatible package source - Package version: 1.2.20-1.2.22 regression range - Install type: source fixture reproduction - OS + version: Linux - Browser or app shell: N/A for server fixture ## Logs, screenshots, or video No private data included. The investigation measured release handlers with schema-valid synthetic fixtures and confirmed the regression in committed versions. ## Additional context 1.2.21 reduced repeated vault reads but did not remove repeated catalog computation. 1.2.22 did not change the generated server bundle relative to 1.2.21. The fix should preserve local-character family isolation and ambiguity handling while making ordinary loading independent of optional source-body discovery. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:26:59 +07:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#374
No description provided.