[GH-ISSUE #1712] [Feature]: Continue lazy-loading startup-adjacent chunks #848

Closed
opened 2026-10-21 05:21:50 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @Xelvanis on GitHub (May 31, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1712

Why load many things when can load less?

App startup still carry big rocks. PR #1711 makes first bonk: AppShell and chat sidebar now load fewer heavy things at boot. Good. But bundle still says: some chunks big, browser chew much code.

Need next lazy-load hunt.

What cave see

  • Startup main chunk after first pass: about 767.77 kB minified in local build.
  • Optional shell things can hide in chunks until user opens them. This good.
  • More places likely still load before user needs them.
  • Existing issue #1532 tracks broad large chunk strategy.
  • Existing issue #1577 tracks manual vendor chunk policy.
  • This issue is narrower: find more app-owned lazy-load wins after AppShell first pass.

Likely next rocks to lift

  • Chat settings drawer and timeline action helpers: many tools, probably not all needed at first chat paint.
  • Mode surfaces with huge route chunks: make sure only chosen mode pays chosen-mode cost.
  • Game and roleplay heavy panels: verify setup/editor/combat/tracker pieces load only when opened.
  • Catalog editors and modals: keep create/edit/import/export flows out of startup path.
  • Export helpers and zip/transcript code: only load when user actually exports.
  • Any remaining broad barrel import that drags whole feature cave into small shell button.

How know rock moved

  • Run pnpm build before/after and compare startup index-*.js plus route chunks.
  • Use Vite output or visualizer to prove import moved out of startup path.
  • Smoke app shell: no blank page, chat list works, open optional surface and it still works.
  • For native-ish paths, run Tauri QA if change touches Tauri-only behavior.

Done when

  • We can name each new lazy boundary and why it safe.
  • Startup chunk shrinks or expensive work moves behind user action.
  • Optional UI still opens cleanly on first click.
  • No mode boundary mud: chat, roleplay, game keep own stuff.
  • No fake fallback. If lazy import fails, app fail honest or show existing error path.

Less load. Less wait. More smooth.

Originally created by @Xelvanis on GitHub (May 31, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1712 ## Why load many things when can load less? App startup still carry big rocks. PR #1711 makes first bonk: AppShell and chat sidebar now load fewer heavy things at boot. Good. But bundle still says: some chunks big, browser chew much code. Need next lazy-load hunt. ## What cave see - Startup main chunk after first pass: about `767.77 kB` minified in local build. - Optional shell things can hide in chunks until user opens them. This good. - More places likely still load before user needs them. - Existing issue #1532 tracks broad large chunk strategy. - Existing issue #1577 tracks manual vendor chunk policy. - This issue is narrower: find more app-owned lazy-load wins after AppShell first pass. ## Likely next rocks to lift - Chat settings drawer and timeline action helpers: many tools, probably not all needed at first chat paint. - Mode surfaces with huge route chunks: make sure only chosen mode pays chosen-mode cost. - Game and roleplay heavy panels: verify setup/editor/combat/tracker pieces load only when opened. - Catalog editors and modals: keep create/edit/import/export flows out of startup path. - Export helpers and zip/transcript code: only load when user actually exports. - Any remaining broad barrel import that drags whole feature cave into small shell button. ## How know rock moved - Run `pnpm build` before/after and compare startup `index-*.js` plus route chunks. - Use Vite output or visualizer to prove import moved out of startup path. - Smoke app shell: no blank page, chat list works, open optional surface and it still works. - For native-ish paths, run Tauri QA if change touches Tauri-only behavior. ## Done when - We can name each new lazy boundary and why it safe. - Startup chunk shrinks or expensive work moves behind user action. - Optional UI still opens cleanly on first click. - No mode boundary mud: chat, roleplay, game keep own stuff. - No fake fallback. If lazy import fails, app fail honest or show existing error path. Less load. Less wait. More smooth.
Author
Owner

@cha1latte commented on GitHub (May 31, 2026):

Triage note: labeling this as normal-scope because it is a focused continuation of startup lazy-loading after #1711, explicitly bounded to app-owned lazy-load wins rather than the broader vendor chunk strategy tracked in #1532/#1577.

The least risky next step is to pick one startup-adjacent import group, prove the bundle movement with before/after build output, and keep any broader chunk policy work in the existing larger issues.

<!-- gh-comment-id:4587588537 --> @cha1latte commented on GitHub (May 31, 2026): Triage note: labeling this as `normal-scope` because it is a focused continuation of startup lazy-loading after #1711, explicitly bounded to app-owned lazy-load wins rather than the broader vendor chunk strategy tracked in #1532/#1577. The least risky next step is to pick one startup-adjacent import group, prove the bundle movement with before/after build output, and keep any broader chunk policy work in the existing larger issues.
Author
Owner

@cha1latte commented on GitHub (May 31, 2026):

fixed in #1711

<!-- gh-comment-id:4587875457 --> @cha1latte commented on GitHub (May 31, 2026): fixed in #1711
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#848
No description provided.