Skip to content
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

fix(replay): Remove unused parts of pako from build #9369

Merged
merged 2 commits into from
Oct 27, 2023
Merged

fix(replay): Remove unused parts of pako from build #9369

merged 2 commits into from
Oct 27, 2023

Conversation

mydea
Copy link
Member

@mydea mydea commented Oct 25, 2023

See nodeca/pako#268, there is some issue with pako tree shaking ootb.

We don't need all the inflation stuff in our bundle.

@mydea mydea requested review from billyvg and lforst October 25, 2023 15:07
@mydea mydea self-assigned this Oct 25, 2023
Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we vendor in pako?

@mydea
Copy link
Member Author

mydea commented Oct 25, 2023

Can we vendor in pako?

It's not so easy because it is all CJS so we'd need to touch every file etc, making updating it etc rather painful 😖

@github-actions
Copy link
Contributor

github-actions bot commented Oct 25, 2023

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 77.44 KB (-6.33% 🔽)
@sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 66.48 KB (-7.39% 🔽)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 30.94 KB (0%)
@sentry/browser - Webpack (gzipped) 21.26 KB (0%)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 67.66 KB (-7.37% 🔽)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 28.93 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped) 21.09 KB (0%)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 216.39 KB (-7.47% 🔽)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 87.77 KB (0%)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 62.76 KB (0%)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 31.71 KB (0%)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 77.82 KB (-6.3% 🔽)
@sentry/react - Webpack (gzipped) 21.29 KB (0%)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 94.16 KB (-5.31% 🔽)
@sentry/nextjs Client - Webpack (gzipped) 47.83 KB (0%)

@billyvg
Copy link
Member

billyvg commented Oct 25, 2023

Nice gains here, can we manually test this to make sure compression still works?

@mydea
Copy link
Member Author

mydea commented Oct 25, 2023

We have some tests for it (integration tests), where we also decompress events again etc! So I think it should be good, but I can also give it a try with a local test all :)

@mydea
Copy link
Member Author

mydea commented Oct 27, 2023

I've also tried it locally with a test app, compression seems to work fine! 👍

@mydea mydea merged commit 8d41656 into develop Oct 27, 2023
85 checks passed
@mydea mydea deleted the fn/pako branch October 27, 2023 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants