Commit Graph

8 Commits

Author SHA1 Message Date
3944cf6ff4 modify id to index map imperatively 2026-02-11 23:35:30 -08:00
cd443b974b perf(player): debounce localStorage persistence
Wrap save() in a 300ms debounce to prevent rapid serialization
when multiple state changes fire in quick succession (e.g. removing
several items or adjusting volume).
2026-02-11 23:35:20 -08:00
31414c5874 perf(player): add idToIndex Map for O(1) track lookups
Replace all linear find/findIndex/some scans with a derived Map
keyed by track.id. This makes currentTrack, currentIndex, hasTrack,
add, playNext, remove, and addAll all O(1) for ID lookups.
2026-02-11 22:56:49 -08:00
da3ab81ae6 perf(player): batch addAll/playAllNext to avoid cascading reactivity
addAll() now collects all new tracks and pushes them in a single
array operation instead of calling add() in a loop, which triggered
per-item reactive updates and O(n²) existence checks.
2026-02-11 22:56:00 -08:00
ed9fcbe116 drag and drop init 2026-02-10 01:55:49 -08:00
9f0234e00e fix play now 2026-02-10 01:48:02 -08:00
99e6fd8eb4 fix shuffle 2026-02-10 01:28:36 -08:00
aea41df214 WIP: global player refactor pt. 1 2026-02-09 23:19:17 -08:00