@spooky-sync/core 0.0.1-canary.87 → 0.0.1-canary.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -414,7 +414,7 @@ var DataModule = class {
414
414
  onDeregister;
415
415
  sessionId = "";
416
416
  currentUserId = null;
417
- constructor(cache, local, schema, logger, streamDebounceTime = 100) {
417
+ constructor(cache, local, schema, logger, streamDebounceTime = 50) {
418
418
  this.cache = cache;
419
419
  this.local = local;
420
420
  this.schema = schema;
@@ -3484,8 +3484,8 @@ function parseBackendInfo(raw) {
3484
3484
 
3485
3485
  //#endregion
3486
3486
  //#region src/modules/devtools/index.ts
3487
- const CORE_VERSION = "0.0.1-canary.87";
3488
- const WASM_VERSION = "0.0.1-canary.87";
3487
+ const CORE_VERSION = "0.0.1-canary.88";
3488
+ const WASM_VERSION = "0.0.1-canary.88";
3489
3489
  const SURREAL_VERSION = "3.0.3";
3490
3490
  var DevToolsService = class {
3491
3491
  eventsHistory = [];
package/dist/types.d.ts CHANGED
@@ -263,8 +263,10 @@ interface Sp00kyConfig<S extends SchemaStructure> {
263
263
  /** A pino browser transmit object for forwarding logs (e.g. via @spooky-sync/core/otel). */
264
264
  otelTransmit?: PinoTransmit;
265
265
  /**
266
- * Debounce time in milliseconds for stream updates.
267
- * Defaults to 100ms.
266
+ * Debounce time in milliseconds for stream updates (the client-side SSP
267
+ * aggregation throttle — coalesces the in-browser StreamProcessor's
268
+ * per-record updates per query before notifying readers).
269
+ * Defaults to 50ms.
268
270
  */
269
271
  streamDebounceTime?: number;
270
272
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spooky-sync/core",
3
- "version": "0.0.1-canary.87",
3
+ "version": "0.0.1-canary.88",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -59,8 +59,8 @@
59
59
  }
60
60
  },
61
61
  "dependencies": {
62
- "@spooky-sync/query-builder": "0.0.1-canary.87",
63
- "@spooky-sync/ssp-wasm": "0.0.1-canary.87",
62
+ "@spooky-sync/query-builder": "0.0.1-canary.88",
63
+ "@spooky-sync/ssp-wasm": "0.0.1-canary.88",
64
64
  "@surrealdb/wasm": "^3.0.3",
65
65
  "fast-json-patch": "^3.1.1",
66
66
  "loro-crdt": "^1.5.6",
@@ -116,7 +116,12 @@ export class DataModule<S extends SchemaStructure> {
116
116
  private local: LocalDatabaseService,
117
117
  private schema: S,
118
118
  logger: Logger,
119
- private streamDebounceTime: number = 100
119
+ // Client-side SSP aggregation throttle: coalesces the in-browser
120
+ // StreamProcessor's per-record stream updates per query before notifying
121
+ // readers, so a burst of synced records repaints the UI once per window
122
+ // rather than row-by-row. 50ms keeps it responsive while still batching the
123
+ // initial-sync stream. Override via `SyncedDbConfig.streamDebounceTime`.
124
+ private streamDebounceTime: number = 50
120
125
  ) {
121
126
  this.logger = logger.child({ service: 'DataModule' });
122
127
  }
package/src/types.ts CHANGED
@@ -113,8 +113,10 @@ export interface Sp00kyConfig<S extends SchemaStructure> {
113
113
  /** A pino browser transmit object for forwarding logs (e.g. via @spooky-sync/core/otel). */
114
114
  otelTransmit?: PinoTransmit;
115
115
  /**
116
- * Debounce time in milliseconds for stream updates.
117
- * Defaults to 100ms.
116
+ * Debounce time in milliseconds for stream updates (the client-side SSP
117
+ * aggregation throttle — coalesces the in-browser StreamProcessor's
118
+ * per-record updates per query before notifying readers).
119
+ * Defaults to 50ms.
118
120
  */
119
121
  streamDebounceTime?: number;
120
122
  /**