sentry-javascript icon indicating copy to clipboard operation
sentry-javascript copied to clipboard

feat(fedback): Convert CDN bundles to use async feedback for lower bundle sizes

Open ryan953 opened this issue 10 months ago • 2 comments

It's more aggressive to start with the async loading strategy in the CDN bundle, but could be safer because if we want to change from async->sync it would not really be a majr version change. Whereas going from sync->async would be more of a big feature, riskier, and could demand a version bump or something.

ryan953 avatar Apr 25 '24 15:04 ryan953

size-limit report 📦

Path Size
@sentry/browser 21.64 KB (0%)
@sentry/browser (incl. Tracing) 32.68 KB (0%)
@sentry/browser (incl. Tracing, Replay) 68.03 KB (0%)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 61.43 KB (0%)
@sentry/browser (incl. Tracing, Replay with Canvas) 72.07 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback) 84.21 KB (0%)
@sentry/browser (incl. Feedback) 37.77 KB (0%)
@sentry/browser (incl. sendFeedback) 26.43 KB (0%)
@sentry/browser (incl. FeedbackAsync) 30.9 KB (0%)
@sentry/react 24.33 KB (0%)
@sentry/react (incl. Tracing) 35.64 KB (0%)
@sentry/vue 25.47 KB (0%)
@sentry/vue (incl. Tracing) 34.47 KB (0%)
@sentry/svelte 21.77 KB (0%)
CDN Bundle 24.02 KB (+0.29% 🔺)
CDN Bundle (incl. Tracing) 34.05 KB (+0.21% 🔺)
CDN Bundle (incl. Tracing, Replay) 67.72 KB (+0.08% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) 73.05 KB (-12.6% 🔽)
CDN Bundle - uncompressed 70.62 KB (+0.06% 🔺)
CDN Bundle (incl. Tracing) - uncompressed 100.98 KB (+0.04% 🔺)
CDN Bundle (incl. Tracing, Replay) - uncompressed 210.59 KB (+0.02% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 224.19 KB (-12.78% 🔽)
@sentry/nextjs (client) 34.86 KB (0%)
@sentry/sveltekit (client) 33.24 KB (0%)
@sentry/node 138.47 KB (0%)

github-actions[bot] avatar Apr 25 '24 15:04 github-actions[bot]

CDN Bundle (incl. Tracing, Replay, Feedback) 73.07 KB (-12.59% 🔽)

Love to see this! 12% of the bundle size was from loading the feedback modules which only render after the user clicks the button. For most pageviews people will not click the button, so thats a large number of bytes saved per pageload.

ryan953 avatar Apr 25 '24 15:04 ryan953