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

Sentry JS bundle is surprisingly large #10473

Closed
1 of 2 tasks
alexgibson opened this issue Sep 17, 2021 · 5 comments
Closed
1 of 2 tasks

Sentry JS bundle is surprisingly large #10473

alexgibson opened this issue Sep 17, 2021 · 5 comments
Assignees
Labels
Bug 🐛 Something's not working the way it should Needs Review Awaiting code review Performance ⚡️ Improve page performance

Comments

@alexgibson
Copy link
Member

alexgibson commented Sep 17, 2021

Description

Webpack gives a warning about the size of our Sentry JS script when compiling:

WARNING in entrypoint size limit: 
The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). 
This can impact web performance.
[1] Entrypoints:
[1]   sentry (389 KiB)
[1]       js/sentry.js

Thankfully it compresses down to ~24Kb in production, but this is still suprisingly large for an error reporting lib.

It looks like others have also reported this problem, and it's on Sentry's upcomng roadmap to improve:

Filing this issue as a reminder to keep an eye out for updates.

@alexgibson alexgibson added Bug 🐛 Something's not working the way it should Performance ⚡️ Improve page performance labels Sep 17, 2021
@vladanpaunovic
Copy link

You can track this better here getsentry/sentry-javascript#4240

We are targeting this release in May.

@alexgibson alexgibson self-assigned this May 31, 2022
@alexgibson
Copy link
Member Author

Looks like Sentry 7.0.0 is released. Tree shaking tips here: https://sentry-docs-git-lms-treeshake-def-integrations.sentry.dev/platforms/javascript/configuration/tree-shaking/

@alexgibson
Copy link
Member Author

Some promising results here following the tree shaking examples linked above:

Uncompressed 336.68kb -> 296.56kb
Minified 77.62kb -> 48.74kb

I do see an issue transpiling 7.0 using babel for older browsers however, which needs some investigating.

@alexgibson
Copy link
Member Author

alexgibson commented May 31, 2022

Filed getsentry/sentry-javascript#5184 for the transpilation issue

alexgibson added a commit to alexgibson/bedrock that referenced this issue May 31, 2022
alexgibson added a commit to alexgibson/bedrock that referenced this issue May 31, 2022
alexgibson added a commit to alexgibson/bedrock that referenced this issue May 31, 2022
alexgibson added a commit to alexgibson/bedrock that referenced this issue May 31, 2022
alexgibson added a commit to alexgibson/bedrock that referenced this issue May 31, 2022
alexgibson added a commit to alexgibson/bedrock that referenced this issue May 31, 2022
alexgibson added a commit to alexgibson/bedrock that referenced this issue Jun 1, 2022
alexgibson added a commit to alexgibson/bedrock that referenced this issue Jun 1, 2022
@alexgibson alexgibson added the Needs Review Awaiting code review label Jun 1, 2022
@vladanpaunovic
Copy link

Thanks for watching over for us @alexgibson!

I saw that getsentry/sentry-javascript/issues/5184 is closed too. Making this one a good candidate for "closed" :)

alexgibson added a commit to alexgibson/bedrock that referenced this issue Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 Something's not working the way it should Needs Review Awaiting code review Performance ⚡️ Improve page performance
Projects
None yet
Development

No branches or pull requests

2 participants