[GH-ISSUE #1887] [Issue]: storage_get is slow for cold character record lookup #912

Closed
opened 2026-10-21 05:23:20 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Promansis on GitHub (Jun 2, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1887

Originally assigned to: @Promansis on GitHub.

Summary

A single command:storage_get for a character record can take roughly 800-900ms on a cold collection read.

Expected behavior

storage_get should locate a requested record without deserializing large payloads from unrelated records in the same collection.

Actual behavior

The character collection is stored as pretty JSON. Large data fields can appear before id, so the streaming id lookup could deserialize heavy non-matching character payloads before discovering each row was not the requested id.

Steps to reproduce

  1. Launch the Tauri desktop app with a populated character collection.
  2. Trigger a character detail read or selector path that calls command:storage_get for a character.
  3. Inspect CrabNebula/Tauri devtools timing for the cold storage_get call.

Impact area

  • App shell, navigation, startup, or providers
  • Catalog resources
  • Chat mode
  • Roleplay mode
  • Game mode
  • Shared mode UI
  • Runtime systems: generation, world-state, visuals, tracker, or haptics
  • Professor Mari or shell tools
  • React-free engine behavior, contracts, agents, or capability ports
  • Shared API wrapper or remote runtime routing
  • Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime
  • Docs, contributor workflow, or templates

Environment

  • Branch or commit: fixed on fix-character-selector-cold-load, commit 6d0a0000
  • Run mode: Tauri desktop
  • OS + version: not captured
  • Node + pnpm versions: not captured
  • Rust version, if relevant: not captured
  • Remote Runtime URL configured? not relevant
  • Provider, model, or integration, if relevant: not relevant

Logs, screenshots, or video

Devtools showed command:storage_get taking roughly 800-900ms after launch.

Regression notes

This is a storage performance issue exposed by cold character-selector workflows.

Additional context

Fix added a pretty-file fast path that scans for the requested id line and parses only the matching record, falling back to the existing JSON deserializer for compact/unusual files.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Jun 2, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1887 Originally assigned to: @Promansis on GitHub. ## Summary A single command:storage_get for a character record can take roughly 800-900ms on a cold collection read. ## Expected behavior storage_get should locate a requested record without deserializing large payloads from unrelated records in the same collection. ## Actual behavior The character collection is stored as pretty JSON. Large data fields can appear before id, so the streaming id lookup could deserialize heavy non-matching character payloads before discovering each row was not the requested id. ## Steps to reproduce 1. Launch the Tauri desktop app with a populated character collection. 2. Trigger a character detail read or selector path that calls command:storage_get for a character. 3. Inspect CrabNebula/Tauri devtools timing for the cold storage_get call. ## Impact area - [ ] App shell, navigation, startup, or providers - [x] Catalog resources - [ ] Chat mode - [x] Roleplay mode - [ ] Game mode - [ ] Shared mode UI - [ ] Runtime systems: generation, world-state, visuals, tracker, or haptics - [ ] Professor Mari or shell tools - [ ] React-free engine behavior, contracts, agents, or capability ports - [ ] Shared API wrapper or remote runtime routing - [x] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [ ] Docs, contributor workflow, or templates ## Environment - Branch or commit: fixed on fix-character-selector-cold-load, commit 6d0a0000 - Run mode: Tauri desktop - OS + version: not captured - Node + pnpm versions: not captured - Rust version, if relevant: not captured - Remote Runtime URL configured? not relevant - Provider, model, or integration, if relevant: not relevant ## Logs, screenshots, or video Devtools showed command:storage_get taking roughly 800-900ms after launch. ## Regression notes This is a storage performance issue exposed by cold character-selector workflows. ## Additional context Fix added a pretty-file fast path that scans for the requested id line and parses only the matching record, falling back to the existing JSON deserializer for compact/unusual files. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:23:20 +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-Engine#912
No description provided.