Skip to content

Commit d9b64db

Browse files
committed
ref(replay): Use fflate instead of pako for compression
According to their own benchmarks (https://www.npmjs.com/package/fflate), this should be faster, and have a smaller bundle size.
1 parent 4babd02 commit d9b64db

22 files changed

+882
-4103
lines changed

packages/browser-integration-tests/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"devDependencies": {
6060
"@types/glob": "8.0.0",
6161
"@types/node": "^14.6.4",
62+
"@types/pako": "^2.0.0",
6263
"glob": "8.0.3"
6364
},
6465
"volta": {

packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-1-snap-incremental-chromium

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": 1,
77
"id": 9,
88
"x": 41.810001373291016,
9-
"y": 18.479999542236328
9+
"y": 18.75
1010
},
1111
"timestamp": [timestamp]
1212
},
@@ -26,7 +26,7 @@
2626
"type": 0,
2727
"id": 9,
2828
"x": 41.810001373291016,
29-
"y": 18.479999542236328
29+
"y": 18.75
3030
},
3131
"timestamp": [timestamp]
3232
},

packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-3-snap-incremental-chromium

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": 1,
77
"id": 9,
88
"x": 41.810001373291016,
9-
"y": 18.479999542236328
9+
"y": 18.75
1010
},
1111
"timestamp": [timestamp]
1212
},
@@ -26,7 +26,7 @@
2626
"type": 0,
2727
"id": 9,
2828
"x": 41.810001373291016,
29-
"y": 18.479999542236328
29+
"y": 18.75
3030
},
3131
"timestamp": [timestamp]
3232
},

packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-5-snap-incremental-chromium

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": 1,
77
"id": 12,
88
"x": 41.810001373291016,
9-
"y": 90.37000274658203
9+
"y": 90.62000274658203
1010
},
1111
"timestamp": [timestamp]
1212
},
@@ -26,7 +26,7 @@
2626
"type": 0,
2727
"id": 12,
2828
"x": 41.810001373291016,
29-
"y": 90.37000274658203
29+
"y": 90.62000274658203
3030
},
3131
"timestamp": [timestamp]
3232
},

packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-6-snap-incremental-chromium

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": 1,
77
"id": 15,
88
"x": 157.13999938964844,
9-
"y": 90.37000274658203
9+
"y": 90.62000274658203
1010
},
1111
"timestamp": [timestamp]
1212
},
@@ -35,7 +35,7 @@
3535
"type": 0,
3636
"id": 15,
3737
"x": 157.13999938964844,
38-
"y": 90.37000274658203
38+
"y": 90.62000274658203
3939
},
4040
"timestamp": [timestamp]
4141
},

packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-7-snap-incremental-chromium

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": 1,
77
"id": 12,
88
"x": 41.810001373291016,
9-
"y": 90.37000274658203
9+
"y": 90.62000274658203
1010
},
1111
"timestamp": [timestamp]
1212
},
@@ -35,7 +35,7 @@
3535
"type": 0,
3636
"id": 12,
3737
"x": 41.810001373291016,
38-
"y": 90.37000274658203
38+
"y": 90.62000274658203
3939
},
4040
"timestamp": [timestamp]
4141
},

packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-9-snap-incremental-chromium

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": 1,
77
"id": 9,
88
"x": 41.810001373291016,
9-
"y": 18.479999542236328
9+
"y": 18.75
1010
},
1111
"timestamp": [timestamp]
1212
},
@@ -26,7 +26,7 @@
2626
"type": 0,
2727
"id": 9,
2828
"x": 41.810001373291016,
29-
"y": 18.479999542236328
29+
"y": 18.75
3030
},
3131
"timestamp": [timestamp]
3232
},

packages/replay-worker/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,9 @@ This is an internal package that is used by @sentry/replay.
1010
It generates a web worker and converts it to a string, so that we can process it easier in replay.
1111

1212
By extracting this into a dedicated (private, internal) package, we can streamline the build of replay.
13+
14+
## Example Worker
15+
16+
You can find an example worker for if you want to self-host the compression worker in [/examples](./examples/).
17+
18+
This is generated from the actual soure via `yarn build:examples`, which should be run manually whenever replay-worker is updated.

0 commit comments

Comments
 (0)