-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate reducing rrweb2 bundle size #8815
Comments
Copying my comment from the upgrade PR: #8760 (comment)
So immediate investigation points:
Longer term points:
|
Ran We could make iframe/canvas recording as an explicit opt-in so that its managers are tree-shaken when not used. This shaves off about ~10% from the replay bundle size (minified, 190KB -> 170KB) (Though I haven't tested if rrweb works without these managers). |
This is fully backwards compatible with prior versions of the Replay SDK. The only breaking change that we will making is to not be masking `aria-label` by default. The reason for this change is to align with our core SDK which also does not mask `aria-label`. This change also enables better support of searching by clicks. Another change that needs to be highlighted is the 13% bundle size increase. This bundle size increase is necessary to bring improved recording performance and improved replay fidelity, especially in regards to web components and iframes. We will be investigating the reduction of the bundle size in [this PR](#8815). Here are benchmarks comparing the version 1 of rrweb to version 2 | metric | v1 | v2 | | --------- | ---------- | ---------- | | lcp | 1486.06 ms | 1529.11 ms | | cls | 0.40 ms | 0.40 ms | | fid | 1.53 ms | 1.50 ms | | tbt | 3207.22 ms | 3036.80 ms | | memoryAvg | 131.83 MB | 124.84 MB | | memoryMax | 324.8 MB | 339.03 MB | | netTx | 282.67 KB | 272.51 KB | | netRx | 8.02 MB | 8.07 MB |
This is fully backwards compatible with prior versions of the Replay SDK. The only breaking change that we will making is to not be masking `aria-label` by default. The reason for this change is to align with our core SDK which also does not mask `aria-label`. This change also enables better support of searching by clicks. Another change that needs to be highlighted is the 13% bundle size increase. This bundle size increase is necessary to bring improved recording performance and improved replay fidelity, especially in regards to web components and iframes. We will be investigating the reduction of the bundle size in [this PR](#8815). Here are benchmarks comparing the version 1 of rrweb to version 2 | metric | v1 | v2 | | --------- | ---------- | ---------- | | lcp | 1486.06 ms | 1529.11 ms | | cls | 0.40 ms | 0.40 ms | | fid | 1.53 ms | 1.50 ms | | tbt | 3207.22 ms | 3036.80 ms | | memoryAvg | 131.83 MB | 124.84 MB | | memoryMax | 324.8 MB | 339.03 MB | | netTx | 282.67 KB | 272.51 KB | | netRx | 8.02 MB | 8.07 MB |
With the work done by @mydea and https://sentry.engineering/blog/session-replay-sdk-bundle-size-optimizations |
Yes! 🎉 |
No description provided.
The text was updated successfully, but these errors were encountered: