You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Polish custom-folder avatar thumbnails: faster first open, optional sidecar files, cache cleanup — without extra background processes.
Problem / motivation
PR #20 replaces live VRM picker canvases with static PNGs (bundled + userData/thumbnails/ cache). That fixes the ~3.7s Appearance stall. Known follow-ups from review and contributor notes:
Short models can look like an empty circle (framing assumes default bust height). Acceptable edge case; optional auto-fit later.
First custom-folder scan still parses each .vrm once to build thumbs — progressive, but user still waits on first sight.
userData cache does not remove entries when a .vrm is deleted from the folder (orphans are small but unbounded in principle).
Proposed solution
A. Pre-warm on directory apply (high value, low complexity)
When Settings → Directories → Avatars saves a Custom path (and scan finds files), start the existing serial thumbnail queue in the background — do not wait for Appearance to open.
Optional: cap queue to first N visible + rest lazy (if folder is huge).
UI: small “Building previews…” in Settings or a one-time notice; picker shows placeholders until each thumb lands.
B. Hybrid cache — sidecar + userData (medium value)
Check, in order:
Sidecar next to the .vrm (if present and newer than source), e.g. MyChar.vrm.png or MyChar.vrm.thumb.png
— instant load, portable when user copies the folder, no orphan problem when file is deleted.
Render once — then write userData; optionally write sidecar when the avatar folder is writable (Settings toggle: “Save preview images next to models”, default off or on).
Bundled avatars keep committed src/assets/avatars/thumbs/avatarN.png only (no sidecar in repo).
C. Cache prune on scan (low complexity)
On scanAvatars / library refresh:
Drop userData PNGs whose source path no longer exists in the scan result.
One-line summary
Polish custom-folder avatar thumbnails: faster first open, optional sidecar files, cache cleanup — without extra background processes.
Problem / motivation
PR #20 replaces live VRM picker canvases with static PNGs (bundled +
userData/thumbnails/cache). That fixes the ~3.7s Appearance stall. Known follow-ups from review and contributor notes:.vrmonce to build thumbs — progressive, but user still waits on first sight.userDatacache does not remove entries when a.vrmis deleted from the folder (orphans are small but unbounded in principle).Proposed solution
A. Pre-warm on directory apply (high value, low complexity)
When Settings → Directories → Avatars saves a Custom path (and scan finds files), start the existing serial thumbnail queue in the background — do not wait for Appearance to open.
getLibraryThumbnail/runQueuedfrom PR perf(appearance): draw avatar thumbnails from images instead of live VRM previews #20; no new process.B. Hybrid cache — sidecar + userData (medium value)
Check, in order:
.vrm(if present and newer than source), e.g.MyChar.vrm.pngorMyChar.vrm.thumb.png— instant load, portable when user copies the folder, no orphan problem when file is deleted.
userData/thumbnails/(PR perf(appearance): draw avatar thumbnails from images instead of live VRM previews #20) — fallback when folder is read-only or no sidecar.Bundled avatars keep committed
src/assets/avatars/thumbs/avatarN.pngonly (no sidecar in repo).C. Cache prune on scan (low complexity)
On
scanAvatars/ library refresh:userDataPNGs whose source path no longer exists in the scan result.urlCacheentries (PR perf(appearance): draw avatar thumbnails from images instead of live VRM previews #20 already callsrevokeThumbnailUrlson rescan).D. Framing for short models (optional / low priority)
Alternatives considered
.vrmPrimary surface
Appearance (avatars / environments)
Constraints you accept
Mock / sketch / reference (optional)
Out of scope (separate issues)
code.gifsize)Use template Feature request. Link PR #20 and parent #10 when opening on GitHub.