[GH-ISSUE #1938] [Issue]: Large avatar originals cause multi-second INP when opening Characters panel #953

Closed
opened 2026-10-21 05:24:01 +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/1938

Originally assigned to: @Promansis on GitHub.

Summary

Opening the Characters right-panel can produce multi-second INP / click processing when visible character avatars are large original image files. The panel renders small avatar slots, but Tauri desktop currently delivers full-size local avatar PNGs through asset.localhost, causing oversized image delivery, decode, and resize work during the interaction.

Expected behavior

Opening the Characters panel should respond quickly, with list/sidebar/group avatar surfaces using small cached thumbnails or otherwise avoiding full-size avatar decode work for tiny display slots.

Actual behavior

Chrome DevTools Performance recorded a long click interaction when opening the Users / Characters panel:

  • Pointer duration: 2.66s
  • Input delay: 1ms
  • Processing duration: 2,509ms
  • Presentation delay: 153ms
  • Earlier trace reached 3.51s total / 3,179ms processing.

DevTools image insight for one visible avatar:

  • Request: local asset.localhost avatar PNG
  • Image file: 1200x1225 PNG, 2.7 MB encoded / decoded
  • Displayed dimensions: about 53x68
  • Estimated saving for responsive delivery: 2.7 MB
  • Request was reported as From cache: No

Blocking the large repeated avatar image requests in DevTools roughly halved the measured INP, strongly pointing to full-size avatar image delivery/decode/resize as the main contributor.

Steps to reproduce

  1. In Tauri desktop on Windows, import or use several characters whose avatars are large original PNGs, including repeated or duplicate imported files.
  2. Open Chrome DevTools Performance and Network.
  3. Record a Performance trace while clicking the Users / Characters right-panel button.
  4. Observe a long pointer/click interaction with most time in processing.
  5. In Network, filter image requests and inspect visible character avatar PNGs delivered from asset.localhost.
  6. Note large original avatar files being used for small list/sidebar avatar slots.
  7. Block the largest repeated avatar requests and repeat the trace; INP drops significantly.

Impact area

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

Environment

  • Branch or commit: refactor branch / current local build, exact commit not captured
  • Run mode: Tauri desktop
  • OS + version: Windows, exact 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

Relevant DevTools observations:

  • Pointer interaction warning: poor page responsiveness.
  • Duration: 2.66s
  • Input delay: 1ms
  • Processing duration: 2,509ms
  • Presentation delay: 153ms
  • Network request example: asset.localhost/.../avatars/characters/Akemi.png
  • Request method: GET
  • Status: 200 OK
  • MIME type: image/png
  • Encoded data: 2.7 MB
  • Decoded body: 2.7 MB
  • From cache: No
  • DevTools insight: image is 1200x1225 but displayed around 53x68.
  • DevTools forced reflow insight existed, but total reflow time was only about 48ms, so it does not appear to be the primary cause.
  • DevTools DOM size insight: about 2,850 total elements, depth 23; not the primary suspect based on the image-blocking test.

Regression notes

Unknown whether this is a regression. The affected path is visible in the refactor Tauri desktop app where managed avatars are served as original local assets.

Additional context

Likely fix direction:

  • Add cached thumbnail delivery for avatar list surfaces, for example 64px/96px/128px thumbnails.
  • Use thumbnails in character list rows, character groups, chat sidebar/recent chats, and other compact avatar surfaces.
  • Continue using original avatar files for editor/detail/lightbox/export surfaces.
  • Add decoding="async" and low fetch priority for non-critical list avatars where appropriate.
  • Consider future content-hash dedupe on avatar import/upload so duplicate imports do not create separate Akemi.png, Akemi-1.png, etc. files with identical image content.
  • Review local asset.localhost cache behavior for Tauri desktop asset URLs; caching alone will not solve first-load decode cost, but lack of cache worsens repeat interactions.

Template check

Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • 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/1938 Originally assigned to: @Promansis on GitHub. ## Summary Opening the Characters right-panel can produce multi-second INP / click processing when visible character avatars are large original image files. The panel renders small avatar slots, but Tauri desktop currently delivers full-size local avatar PNGs through `asset.localhost`, causing oversized image delivery, decode, and resize work during the interaction. ## Expected behavior Opening the Characters panel should respond quickly, with list/sidebar/group avatar surfaces using small cached thumbnails or otherwise avoiding full-size avatar decode work for tiny display slots. ## Actual behavior Chrome DevTools Performance recorded a long click interaction when opening the Users / Characters panel: - Pointer duration: 2.66s - Input delay: 1ms - Processing duration: 2,509ms - Presentation delay: 153ms - Earlier trace reached 3.51s total / 3,179ms processing. DevTools image insight for one visible avatar: - Request: local `asset.localhost` avatar PNG - Image file: 1200x1225 PNG, 2.7 MB encoded / decoded - Displayed dimensions: about 53x68 - Estimated saving for responsive delivery: 2.7 MB - Request was reported as `From cache: No` Blocking the large repeated avatar image requests in DevTools roughly halved the measured INP, strongly pointing to full-size avatar image delivery/decode/resize as the main contributor. ## Steps to reproduce 1. In Tauri desktop on Windows, import or use several characters whose avatars are large original PNGs, including repeated or duplicate imported files. 2. Open Chrome DevTools Performance and Network. 3. Record a Performance trace while clicking the Users / Characters right-panel button. 4. Observe a long pointer/click interaction with most time in processing. 5. In Network, filter image requests and inspect visible character avatar PNGs delivered from `asset.localhost`. 6. Note large original avatar files being used for small list/sidebar avatar slots. 7. Block the largest repeated avatar requests and repeat the trace; INP drops significantly. ## Impact area - [x] App shell, navigation, startup, or providers - [x] Catalog resources - [x] Shared mode UI - [x] Shared API wrapper or remote runtime routing - [x] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [ ] Chat mode - [ ] Roleplay mode - [ ] Game mode - [ ] Runtime systems: generation, world-state, visuals, tracker, or haptics - [ ] Professor Mari or shell tools - [ ] React-free engine behavior, contracts, agents, or capability ports - [ ] Docs, contributor workflow, or templates ## Environment - Branch or commit: refactor branch / current local build, exact commit not captured - Run mode: Tauri desktop - OS + version: Windows, exact 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 Relevant DevTools observations: - `Pointer` interaction warning: poor page responsiveness. - `Duration`: 2.66s - `Input delay`: 1ms - `Processing duration`: 2,509ms - `Presentation delay`: 153ms - Network request example: `asset.localhost/.../avatars/characters/Akemi.png` - Request method: GET - Status: 200 OK - MIME type: image/png - Encoded data: 2.7 MB - Decoded body: 2.7 MB - From cache: No - DevTools insight: image is 1200x1225 but displayed around 53x68. - DevTools forced reflow insight existed, but total reflow time was only about 48ms, so it does not appear to be the primary cause. - DevTools DOM size insight: about 2,850 total elements, depth 23; not the primary suspect based on the image-blocking test. ## Regression notes Unknown whether this is a regression. The affected path is visible in the refactor Tauri desktop app where managed avatars are served as original local assets. ## Additional context Likely fix direction: - Add cached thumbnail delivery for avatar list surfaces, for example 64px/96px/128px thumbnails. - Use thumbnails in character list rows, character groups, chat sidebar/recent chats, and other compact avatar surfaces. - Continue using original avatar files for editor/detail/lightbox/export surfaces. - Add `decoding="async"` and low fetch priority for non-critical list avatars where appropriate. - Consider future content-hash dedupe on avatar import/upload so duplicate imports do not create separate `Akemi.png`, `Akemi-1.png`, etc. files with identical image content. - Review local `asset.localhost` cache behavior for Tauri desktop asset URLs; caching alone will not solve first-load decode cost, but lack of cache worsens repeat interactions. ## Template check Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:24:01 +07:00
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#953
No description provided.