@glimt/record 0.0.66 → 0.0.67

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/record.cjs CHANGED
@@ -10327,12 +10327,16 @@ const _StormSnapshotManager = class _StormSnapshotManager2 {
10327
10327
  __publicField(_StormSnapshotManager, "instance");
10328
10328
  let StormSnapshotManager = _StormSnapshotManager;
10329
10329
  const stormSnapshotManager = new StormSnapshotManager();
10330
- class MutationRateLimiter {
10330
+ const _MutationRateLimiter = class _MutationRateLimiter2 {
10331
10331
  constructor() {
10332
10332
  __publicField(this, "mutTracker");
10333
10333
  __publicField(this, "interval", 50);
10334
- __publicField(this, "limit", 150);
10334
+ __publicField(this, "limit", 100);
10335
10335
  __publicField(this, "inGlobalStorm", false);
10336
+ if (_MutationRateLimiter2.instance) {
10337
+ return _MutationRateLimiter2.instance;
10338
+ }
10339
+ _MutationRateLimiter2.instance = this;
10336
10340
  debugLog(`MutationRateLimiter, init`);
10337
10341
  this.reset();
10338
10342
  }
@@ -10350,6 +10354,7 @@ class MutationRateLimiter {
10350
10354
  debugLog(`MutationRateLimiter, detected global storm over`);
10351
10355
  return false;
10352
10356
  }
10357
+ this.mutTracker.ts = now;
10353
10358
  return true;
10354
10359
  }
10355
10360
  if (this.mutTracker.ts === -1) {
@@ -10368,7 +10373,9 @@ class MutationRateLimiter {
10368
10373
  this.mutTracker.ts = now;
10369
10374
  return false;
10370
10375
  }
10371
- }
10376
+ };
10377
+ __publicField(_MutationRateLimiter, "instance");
10378
+ let MutationRateLimiter = _MutationRateLimiter;
10372
10379
  const mutationRateLimiter = new MutationRateLimiter();
10373
10380
  function isNodeInLinkedList(n2) {
10374
10381
  return "__ln" in n2;
@@ -10506,11 +10513,6 @@ class MutationBuffer {
10506
10513
  mutationLimit: 800
10507
10514
  //was 1500
10508
10515
  });
10509
- __publicField(this, "rollingMutTracker", {
10510
- accumlativeMuts: 0,
10511
- ts: -1,
10512
- interval: 50
10513
- });
10514
10516
  __publicField(this, "handleStormMutations", (muts, canFinishStorm = true) => {
10515
10517
  const time = Date.now();
10516
10518
  if (this.stormInfo == null) {
@@ -10576,11 +10578,6 @@ class MutationBuffer {
10576
10578
  }
10577
10579
  });
10578
10580
  __publicField(this, "processInternalMutations", (muts, overrideStorm = false) => {
10579
- console.log(
10580
- "muts",
10581
- muts.length,
10582
- JSON.parse(JSON.stringify(this.rollingMutTracker))
10583
- );
10584
10581
  if (!overrideStorm) {
10585
10582
  const isStorming = mutationRateLimiter.isStorming(muts.length);
10586
10583
  if (isStorming) {