From 23f85ace7748f76c8e62abca7080a1917342d09f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Dias?= <112943738+JoaoDiasAbly@users.noreply.github.com> Date: Tue, 26 Nov 2024 09:41:11 +0000 Subject: [PATCH] Adjust cursors default outboundBatchInterval (#337) --- src/Cursors.test.ts | 4 ++-- src/Space.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Cursors.test.ts b/src/Cursors.test.ts index 1f0c8802..383f4ae8 100644 --- a/src/Cursors.test.ts +++ b/src/Cursors.test.ts @@ -116,7 +116,7 @@ describe('Cursors', () => { vi.spyOn(channel.presence, 'get').mockImplementation(createPresenceCount(2)); await cursors['onPresenceUpdate'](); expect(batching.shouldSend).toBeTruthy(); - expect(batching.batchTime).toEqual(25); + expect(batching.batchTime).toEqual(50); }); it('batchTime is updated when multiple people are present', async ({ @@ -126,7 +126,7 @@ describe('Cursors', () => { }) => { vi.spyOn(channel.presence, 'get').mockImplementation(createPresenceCount(2)); await cursors['onPresenceUpdate'](); - expect(batching.batchTime).toEqual(25); + expect(batching.batchTime).toEqual(50); }); describe('pushCursorPosition', () => { diff --git a/src/Space.ts b/src/Space.ts index e3a40fe0..d0d041fb 100644 --- a/src/Space.ts +++ b/src/Space.ts @@ -20,7 +20,7 @@ const SPACE_CHANNEL_TAG = '::$space'; const SPACE_OPTIONS_DEFAULTS = { offlineTimeout: 120_000, cursors: { - outboundBatchInterval: 25, + outboundBatchInterval: 50, paginationLimit: 5, }, };