From 87f68f121d37d787b0d8af20b5925ea1354f2925 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pedro=20Monteiro=20Morgado=20Dias?= Date: Fri, 15 Nov 2024 23:45:35 +0000 Subject: [PATCH] Adjust cursors default outboundBatchInterval --- 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, }, };