@glimt/record 0.0.35 → 0.0.36

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
@@ -1172,7 +1172,6 @@ function serializeTextNode(n2, options) {
1172
1172
  };
1173
1173
  }
1174
1174
  function serializeElementNode(n2, options) {
1175
- const start = performance.now();
1176
1175
  const {
1177
1176
  doc,
1178
1177
  blockClass,
@@ -1371,19 +1370,6 @@ function serializeElementNode(n2, options) {
1371
1370
  if (customElements.get(tagName)) isCustomElement = true;
1372
1371
  } catch (e2) {
1373
1372
  }
1374
- const took = performance.now() - start;
1375
- if (!window.serialization_perf_map) window.serialization_perf_map = {};
1376
- if (!(tagName in window.serialization_perf_map)) {
1377
- window.serialization_perf_map[tagName] = {
1378
- avg: 0,
1379
- times: []
1380
- };
1381
- }
1382
- window.serialization_perf_map[tagName].times.push(took);
1383
- if (window.serialization_perf_map[tagName].times.length > 1e3) {
1384
- window.serialization_perf_map[tagName].times.shift();
1385
- }
1386
- window.serialization_perf_map[tagName].avg = window.serialization_perf_map[tagName].times.reduce((a2, b) => a2 + b, 0) / window.serialization_perf_map[tagName].times.length;
1387
1373
  return {
1388
1374
  type: NodeType$2.Element,
1389
1375
  tagName,
@@ -9751,15 +9737,6 @@ class DoubleLinkedList {
9751
9737
  }
9752
9738
  }
9753
9739
  const moveKey = (id, parentId) => `${id}@${parentId}`;
9754
- function makeid(length = 8) {
9755
- var result2 = "";
9756
- var characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
9757
- var charactersLength = characters.length;
9758
- for (var i2 = 0; i2 < length; i2++) {
9759
- result2 += characters.charAt(Math.floor(Math.random() * charactersLength));
9760
- }
9761
- return result2;
9762
- }
9763
9740
  class MutationBuffer {
9764
9741
  constructor() {
9765
9742
  __publicField(this, "frozen", false);
@@ -9796,7 +9773,6 @@ class MutationBuffer {
9796
9773
  __publicField(this, "canvasManager");
9797
9774
  __publicField(this, "processedNodeManager");
9798
9775
  __publicField(this, "unattachedDoc");
9799
- __publicField(this, "bufId", makeid());
9800
9776
  __publicField(this, "stormBatches", []);
9801
9777
  __publicField(this, "stormInfo", null);
9802
9778
  __publicField(this, "stormSettings", {
@@ -9810,11 +9786,6 @@ class MutationBuffer {
9810
9786
  __publicField(this, "handleStormMutations", (muts) => {
9811
9787
  const time = Date.now();
9812
9788
  if (this.stormInfo == null) {
9813
- console.log(
9814
- "detected probable mutation storm start",
9815
- "buffer id:",
9816
- this.bufId
9817
- );
9818
9789
  this.stormInfo = {
9819
9790
  startedAt: time,
9820
9791
  totalMutations: 0,
@@ -9845,18 +9816,6 @@ class MutationBuffer {
9845
9816
  __publicField(this, "handleStormFinish", () => {
9846
9817
  if (!this.stormInfo) return;
9847
9818
  const { stormExceededLimit } = this.stormInfo;
9848
- console.log(
9849
- "mutation storm finished",
9850
- "totalMutations:",
9851
- this.stormInfo.totalMutations,
9852
- "stormExceededLimit:",
9853
- stormExceededLimit,
9854
- "storm duration:",
9855
- Date.now() - this.stormInfo.startedAt,
9856
- "ms",
9857
- "buffer id:",
9858
- this.bufId
9859
- );
9860
9819
  clearTimeout(this.stormInfo.timeout);
9861
9820
  this.stormInfo = null;
9862
9821
  if (!stormExceededLimit) {
@@ -10344,6 +10303,7 @@ class MutationBuffer {
10344
10303
  }
10345
10304
  });
10346
10305
  }
10306
+ // private bufId: string = makeid();
10347
10307
  init(options) {
10348
10308
  [
10349
10309
  "mutationCb",
@@ -12420,7 +12380,6 @@ function record(options = {}) {
12420
12380
  if (!recordDOM) {
12421
12381
  return;
12422
12382
  }
12423
- const start = performance.now();
12424
12383
  wrappedEmit(
12425
12384
  {
12426
12385
  type: EventType.Meta,
@@ -12488,7 +12447,6 @@ function record(options = {}) {
12488
12447
  document.adoptedStyleSheets,
12489
12448
  mirror.getId(document)
12490
12449
  );
12491
- console.log("full snapshot took", performance.now() - start, "ms");
12492
12450
  };
12493
12451
  try {
12494
12452
  const handlers = [];