[GH-ISSUE #1934] Improve Characters side panel open performance #950

Closed
opened 2026-10-21 05:23:59 +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/1934

Originally assigned to: @Promansis on GitHub.

Problem

Opening the Characters right side panel can feel slow, especially after recent storage_get/storage_list performance work shifted attention to panel mount cost.

Evidence

  • src/app/shell/RightPanel.tsx lazy-loads ../../features/catalog/characters/shell just to render CharactersPanel.
  • src/features/catalog/characters/shell.ts is a broad barrel that also exports editor, full library, maker, create/import modals, and card update modal. The existing build artifact for this shell chunk is about 193 KB minified, so first panel open pays for code that is not needed for the compact list.
  • CharactersPanel mounts useCharacterSummaries and useCharacterGroups immediately.
  • Character summaries request many large card fields: description, personality, scenario, first_mes, mes_example, system_prompt, post_history_instructions, alternate_greetings, character_book, extensions, even though the side panel mostly needs compact display metadata.
  • Visible rows compute token estimates from those prompt/book fields during render.

Likely Fix

  • Split the Characters side panel into a narrow lazy entrypoint so opening the panel does not import the editor/maker/import/export surfaces.
  • Add a lightweight side-panel character summary projection with only the fields needed for compact rows, groups, tags/favorite/color/avatar crop metadata, and timestamps.
  • Move full prompt/book data loading to detail/full-library/search paths that actually need it, or precompute/cache token estimates separately.

Acceptance Criteria

  • First open of the Characters right panel loads only the panel-specific entrypoint and its direct dependencies.
  • The side panel summary query avoids full prompt/book fields unless search/detail behavior requires them.
  • Existing character list, groups, tags, favorite filtering, avatar display, and chat assignment behavior continue to work.
  • Verification includes targeted typecheck/build or equivalent focused proof.
Originally created by @Promansis on GitHub (Jun 2, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1934 Originally assigned to: @Promansis on GitHub. ## Problem Opening the Characters right side panel can feel slow, especially after recent storage_get/storage_list performance work shifted attention to panel mount cost. ## Evidence - src/app/shell/RightPanel.tsx lazy-loads ../../features/catalog/characters/shell just to render CharactersPanel. - src/features/catalog/characters/shell.ts is a broad barrel that also exports editor, full library, maker, create/import modals, and card update modal. The existing build artifact for this shell chunk is about 193 KB minified, so first panel open pays for code that is not needed for the compact list. - CharactersPanel mounts useCharacterSummaries and useCharacterGroups immediately. - Character summaries request many large card fields: description, personality, scenario, first_mes, mes_example, system_prompt, post_history_instructions, alternate_greetings, character_book, extensions, even though the side panel mostly needs compact display metadata. - Visible rows compute token estimates from those prompt/book fields during render. ## Likely Fix - Split the Characters side panel into a narrow lazy entrypoint so opening the panel does not import the editor/maker/import/export surfaces. - Add a lightweight side-panel character summary projection with only the fields needed for compact rows, groups, tags/favorite/color/avatar crop metadata, and timestamps. - Move full prompt/book data loading to detail/full-library/search paths that actually need it, or precompute/cache token estimates separately. ## Acceptance Criteria - First open of the Characters right panel loads only the panel-specific entrypoint and its direct dependencies. - The side panel summary query avoids full prompt/book fields unless search/detail behavior requires them. - Existing character list, groups, tags, favorite filtering, avatar display, and chat assignment behavior continue to work. - Verification includes targeted typecheck/build or equivalent focused proof.
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#950
No description provided.