Open WeiLingQiang opened 5 months ago
Hey! What do you mean with "memory"? Appsize? Or memory used during runtime?
Hey! What do you mean with "memory"? Appsize? Or memory used during runtime?
memory used during runtime,
TotalPss
Use adb command: adb shell dumpsys meminfo <package_name>
Admittedly, 30-40 MB sounds like a lot but there's a whole bunch of things the SDK does. I'd be much more wary about the SDK's behavior over the game's lifecycle. Looking at an empty project's memory profile I'm not sure I see the problem yet. What makes you think there is one?
You should check the memory in the Android APK package instead of unity.
You can try to use the ADB command to compare the empty project and SentryDemo project
adb shell dumpsys meminfo <package_name>
The above is a screenshot of the ADB command adb shell dumpsys meminfo <package_name>
I don't doubt that you are right about the increase. I just tried to illustrate what that memory layout looks like. I'm not convinced that the SDK's memory footprint is an actual issue.
Excuse me, is there a way to reduce memory occupation
Can you share your configuration of the SDK?
You turn the file to the .asset suffix
The only config I can see on your options that I can see have an effect on memory is to reduce the maximum amount of breadcrumbs. But I expect this to be negligible. You can also disable the native Android support and see if that changes the memory consumption in a way that is acceptable to you.
@WeiLingQiang Did you have a chance to try without the native Android support?
We also made a lot of changes since then, have you had a chance to peek at the memory usage again?
Environment
How do you use Sentry? Sentry SaaS (sentry.io) or self-hosted/on-premise (which version?)
Which version of the SDK? v2.0.4
How did you install the package? (Git-URL, Assetstore) Git-URL
Which version of Unity? 2021.3.33f1
Is this happening in Unity (editor) or on a player like Android, iOS, Windows? Android
Steps to Reproduce
Init SentrySDK
Expected Result
Memory growth is only within 10MB
Actual Result
I try with an "empty" Unity project with Sentry added, After discovering the initial SENTRYSDK, the memory increased by 30-40MB