ytptube/ui/app/types
Jesse Bate 0cb3a95a41 perf: batch item_updated WebSocket events into a single per-tick payload
The per-download 500ms throttle still scales linearly with concurrency:
N active downloads produce up to 2N item_updated frames per second, each
with its own serialization pass and per-client send.

Add an ItemBatcher at the WebSocket boundary that coalesces dirty items
by _id (last write wins) and emits one item_updated frame per 500ms
tick whose payload is always a list of items, even for a single update.
Leading-edge emits keep isolated updates (e.g. renames via the API)
instant, and a trailing flush at most 500ms later delivers the rest.
Pending items are flushed on shutdown before clients disconnect.

Emitter call sites, the EventBus, and the StatusTracker throttle are
unchanged; the batcher only changes the wire format. The frontend now
types item_updated as StoreItem[] and iterates the array.

BREAKING CHANGE: the item_updated WebSocket event payload (data) is now
always an array of items instead of a single item object.
2026-06-10 23:38:27 +09:30
..
autocomplete.d.ts refactor: switch from pnpm to bun 2026-02-20 22:46:30 +03:00
changelogs.d.ts refactor: switch from pnpm to bun 2026-02-20 22:46:30 +03:00
conditions.d.ts refactor: switch from pnpm to bun 2026-02-20 22:46:30 +03:00
config.d.ts feat: make log level runtime managable. 2026-05-28 21:26:23 +03:00
diagnostics.ts feat: add system diagnostics endpoint. 2026-05-26 19:22:36 +03:00
dl_fields.d.ts Refactor: rebase the UI on top of nuxt/ui 2026-03-25 22:59:53 +03:00
filebrowser.d.ts refactor: switch from pnpm to bun 2026-02-20 22:46:30 +03:00
globals.d.ts refactor: switch from pnpm to bun 2026-02-20 22:46:30 +03:00
index.d.ts refactor: update terminal api 2026-04-29 22:25:39 +03:00
item.d.ts refactor: switch from pnpm to bun 2026-02-20 22:46:30 +03:00
limits.ts refactor: minor ui cleanup 2026-05-17 20:21:58 +03:00
logs.ts refactor: standardize JSONL structure. 2026-05-24 21:19:25 +03:00
notification.d.ts refactor: migrate notifications to the new db model 2026-01-21 18:29:16 +03:00
presets.d.ts refactor: switch from pnpm to bun 2026-02-20 22:46:30 +03:00
responses.d.ts refactor: switch from pnpm to bun 2026-02-20 22:46:30 +03:00
sockets.d.ts perf: batch item_updated WebSocket events into a single per-tick payload 2026-06-10 23:38:27 +09:30
store.d.ts perf: exclude unused fields from ItemDTO list and WebSocket serialization 2026-06-10 20:09:13 +09:30
subtitles.ts feat: custom video player with direct ssa rendering 2026-05-04 09:21:43 +03:00
task_definitions.ts refactor: switch from pnpm to bun 2026-02-20 22:46:30 +03:00
task_inspect.d.ts refactor: switch from pnpm to bun 2026-02-20 22:46:30 +03:00
tasks.ts refactor: switch from pnpm to bun 2026-02-20 22:46:30 +03:00
video.d.ts refactor: improve video player rendering 2026-05-05 23:01:50 +03:00
ytdlp.d.ts refactor: switch from pnpm to bun 2026-02-20 22:46:30 +03:00