sentry-unity
sentry-unity copied to clipboard
Bundle size needs to be part of CI
The size of the SDK is critical to many customers. During CI we should measure the size and post as a commit to the PR.
Some ideas are: measure the size of all the .dll files in https://github.com/getsentry/sentry-unity/tree/main/package-dev/Runtime.
This obviously doesn't mean a lot since the linker would drop a lot of code, particularly from the dependencies.
Ideally we'd build the sample app (with IL2CPP for a platform such as Android), then remove Sentry as a dependency and build it again. Since the sample uses pretty much all public API, it'll be a very realistic number. Customers can expect that overhead or less, depending on their usage of the SDK.
Relates to: https://github.com/getsentry/sentry-java/issues/1303
With https://github.com/getsentry/sentry-unity/pull/451 we already have all we need. The integration-test builds an empty project and then adds Sentry and builds it again. We could use those?
Update on the current state:
- build without Sentry doesn't happen on PRs right now to speed up CI
- I've built an action recently that could be used to track the binary size and post to the PR. It also can run the app on and measure startup diff but that would be too much trouble for our poor PR here in the unity SDK.
with the above being said, we could add a new workflow centered around this issue - i.e. build the integration test app without SDK, copy the app, then build it with the sdk. That's the way we do it on some of the other SDKs, e.g. RN, Flutter, Java, ...
Alternatively, we can add the action call to our smoke-test-build & remove the logic that only builds without sentry SDK on main