perf: coalesce watch together rebuilds, static TV overlays

This commit is contained in:
edde746
2026-03-25 06:40:17 +01:00
parent 4beeedd318
commit 4cef99dda2
4 changed files with 80 additions and 42 deletions
@@ -316,10 +316,11 @@ class WatchTogetherSyncManager {
_clockOffset = 0;
_pendingPingTimestamp = null;
// Initial burst of 3 pings for fast convergence
// Initial burst of 2 pings for convergence, with wider spacing to reduce
// main-thread pressure during the join event storm
int burstCount = 0;
Timer.periodic(const Duration(milliseconds: 200), (timer) {
if (burstCount >= 3 || _player == null) {
Timer.periodic(const Duration(milliseconds: 500), (timer) {
if (burstCount >= 2 || _player == null) {
timer.cancel();
return;
}