vodStoryboardClientCache was a plain Map<vodId, VodStoryboard | null> with no eviction. Every VOD ever hovered cached its first sprite data URL — about 50-200 KB each. Browsing a long-running streamer's 2000-VOD archive could leave the renderer holding 100-400 MB of hover-only sprite data permanently, with no signal to the user that it was happening. Wrapped writes in a rememberStoryboard helper that caps the cache at 100 entries with FIFO eviction (Map iterator is insertion-ordered so .keys().next().value is always the oldest). Cache hit / miss semantics unchanged for the live set — only the dropped-off-the- back entries get re-fetched if the user scrolls back to a VOD they hovered hundreds of cards ago, and that re-fetch is fast because the main-process side has its own metadata cache that survives the renderer-side eviction. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| build | ||
| docs | ||
| scripts | ||
| src | ||
| .gitignore | ||
| eslint.config.mjs | ||
| package-lock.json | ||
| package.json | ||
| README_AI_RELEASE.md | ||
| tsconfig.json | ||