perf: halve stream flush cadence from 60hz to 30hz

FLUSH_FRAME_MS 16 -> 33. Delta events keep coalescing, just into larger
windows. AssistantTextPart already throttles text at 100ms, so the extra
granularity produced no visible benefit — just extra store.setState calls
and subscriber notifications per second.
This commit is contained in:
Bohdan Triapitsyn
2026-04-20 20:56:24 +03:00
parent 9f81c8fa46
commit a8a336b0a0
+1 -1
View File
@@ -19,7 +19,7 @@ export type QueuedEvent = {
export type FlushHandler = (events: QueuedEvent[]) => void
const FLUSH_FRAME_MS = 16
const FLUSH_FRAME_MS = 33
const STREAM_YIELD_MS = 8
const RECONNECT_DELAY_MS = 250
const HEARTBEAT_TIMEOUT_MS = 15_000