Open hajimeku opened 1 year ago
Thanks for pointing this out.
I was definitely expecting an increase in size but not of this much. Unfortunately, we have to target netstandard2.0
which leads to quite a few dependencies.
And I don't expect the aliasing we do on those dependencies to do us any favours either.
Well, thats something we will have to deal with then. it's been amazing reporting some very difficult crashes so far. Keep it up.
FYI @bitsandfoxes to track size increase (on PRs) we could use the "app binary size" metrics action from https://github.com/getsentry/action-app-sdk-overhead-metrics
Shouldn't be a big effort, it takes two APKs, one with and one without the SDK included. We would just need to reenable building the APK before Unity is added (we do that on the main branch only at the moment) and then grab those two APKs and pass it to the action. It will report the difference & also check how it changed from the main branch for a current PR. Without any more changes the action supports APKs and IPAs but for the app size metric, it would also be easy to add other platforms. Wouldn't go as far as adding support for app-startup metrics for more platforms at the moment.
@vaind That is a valid issue but it will not reflect the actual impact on a production project. Targeting a different framework does increase the size but the majority will be stripped by unity if you dont reference all the api's.
it will not reflect the actual impact on a production project
Fair point. But we could consider using our integration test project for this. Since it's actually using most parts of the SDK it should give a fairly good idea of the impact we're having on the app size.
Environment
How do you use Sentry? Sentry Saas
Which version of the SDK? 0.26
How did you install the package? (Git-URL, Assetstore) Git-URL
Which version of Unity? 2021.3.10
Is this happening in Unity (editor) or on a player like Android, iOS, Windows? Android
Steps to Reproduce
Make an android build
Expected Result
Smaller build size
Actual Result
big build size
Any logs or screenshots
The left is a build without sentry, the right is with sentry