Closed phuong closed 3 years ago
Have you considered using the recipe to compress the events generated on the client side?
Have you considered using the recipe to compress the events generated on the client side?
@ucjonathan I did tried with compress-json
, but the size is still large
@phuong
You can stringify the full snapshot JSON.stringify(snapshot)
and split the string into multiple chunks
function chunkSubstr(str, size) {
const numChunks = Math.ceil(str.length / size)
const chunks = new Array(numChunks)
for (let i = 0, o = 0; i < numChunks; ++i, o += size) {
chunks[i] = str.substr(o, size)
}
return chunks
}
Have you looked at the packFn support in this recipe?
https://github.com/rrweb-io/rrweb/blob/master/docs/recipes/optimize-storage.md
Can this help https://github.com/saltyrtc/chunked-dc-js
Thank you for make rrweb better day by day.
Based on the document,
FullSnapshot
record will be increase the size bigger and bigger.@Yuyz0112 @here is there any way to separate
FullSnapshot
into small chunks?