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 adds 1.6 mb to my 11.3 mb WebGL build (and that's a lot!) #1894

Open
Romaleks360 opened this issue Nov 10, 2024 · 1 comment
Open

Comments

@Romaleks360
Copy link

Romaleks360 commented Nov 10, 2024

Hello and thanks for the amazing work.

I would really like to use Sentry in my project, but I also care a lot about my app build size, since it directly affects loading times, and that's crucial for the web app user experience.

Simply adding Sentry 2.3.0 package increased my build size from 11.3 to 12.9 (1.6 mb diff). This seems a bit too much for the error tracking.
For example, adding GameAnalytics had an insignificant impact on the build size, while it also provides simple error tracking.

I'm also not sure where this data comes from.
Stripping level set to High, Brotli compression.


A bit more info:

Build Report Without Sentry
Build Report
Uncompressed usage by category (Percentages based on user generated assets only):
Textures               8.6 mb	 82.1% 
Meshes                 0.6 kb	 0.0% 
Animations             0.0 kb	 0.0% 
Sounds                 0.0 kb	 0.0% 
Shaders                783.5 kb	 7.3% 
Other Assets           879.4 kb	 8.2% 
Levels                 0.0 kb	 0.0% 
File headers           111.8 kb	 1.0% 
Total User Assets      10.4 mb	 100.0% 
Complete build size    11.3 mb
Build Report With Sentry
Build Report
Uncompressed usage by category (Percentages based on user generated assets only):
Textures               8.6 mb	 82.1% 
Meshes                 0.6 kb	 0.0% 
Animations             0.0 kb	 0.0% 
Sounds                 0.0 kb	 0.0% 
Shaders                783.5 kb	 7.3% 
Other Assets           879.8 kb	 8.2% 
Levels                 0.0 kb	 0.0% 
File headers           112.1 kb	 1.0% 
Total User Assets      10.4 mb	 100.0% 
Complete build size    12.9 mb

So it's all the same, but the Complete build size got bigger :)

Build file size breakdown
- *.wasm.br: 6.7 mb -> 7.9 mb
- *.data.br: 4.7 mb -> 5.1 mb (that's unusual, I thought only assets go here)

Can something be done here to reduce the Sentry build size? Thanks.

@bruno-garcia
Copy link
Member

bruno-garcia commented Nov 11, 2024

I'm not sure what the 1MB is about, if it's not just code. Is there a way to debug this through?

Is the linker dropping unused code?

We don't even add our JavaScript SDK yet, which we were considering, so it would capture even more types of errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: No status
Development

No branches or pull requests

3 participants