ytptube/app
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
..
features feat: add YTP_DISABLE_EXEC to strip dangerous yt-dlp options 2026-06-08 09:29:31 +03:00
library perf: batch item_updated WebSocket events into a single per-tick payload 2026-06-10 23:38:27 +09:30
migrations refactor: move presets to db model 2026-01-25 19:17:54 +03:00
routes perf: lazy-load folders on demand; remove queue from config endpoint 2026-06-10 20:07:19 +09:30
schema refactor: migrate task definitions to db model 2026-01-23 23:38:59 +03:00
scripts refactor: use single logger namespace 2026-05-28 19:07:11 +03:00
tests perf: batch item_updated WebSocket events into a single per-tick payload 2026-06-10 23:38:27 +09:30
yt_dlp_plugins fix: use yt-dlp meta extractors methods instead of local rolled ones 2026-05-08 21:39:12 +03:00
__init__.py Fix upgrading and installing pip packages 2025-07-24 17:22:05 +03:00
conftest.py fix: disable file logging during tests 2026-06-08 08:44:25 +03:00
local.py fix: improve the native build 2026-04-10 19:58:36 +03:00
main.py fix: startup crash if access long was turned off 2026-05-28 22:21:56 +03:00
upgrader.py refactor: use single logger namespace 2026-05-28 19:07:11 +03:00