Closed romanmbraingames closed 5 months ago
Hi @romanmbraingames , thank you for raising the issue. We're already working on a way to reduce the amount of serialize/deserialize calls. Will update here once the fix is released.
Hi @romanmbraingames , we made changes to move serialize/deserialize to a background thread and released them in version 6.4.1 of our Unity Plugin.
MAX Plugin Version
5.11.3
Unity Version
2021.3.28f
Device/Platform Info
Checked in Unity Editor and Android Device (Motorola ellis)
Current Behavior
Currently, the MaxSdkCallbacks.ForwardEvent allocates around 200KB every OnBannerAdLoadedEvent, OnBannerAdClickedEvent (i.e. every that contains AdInfo).
It looks like the current implementation of the method is not efficient enough for a usage.
On our side we did a several in-place changes above the current implementation to address this problem on our side but it will be nice to cover this on the side of the SDK.
List of changes:
[Serializable] class EventPropsName { public string name; }; JsonUtility.FromJson<EventPropsName>(eventProps).name
to receive an event name (but the recommended way is to pass it from native part as the separate parameter)Expected Behavior
No response
How to Reproduce
It's easy to reproduce, just integrate Ads banner and launch an application. Every time when you are receiving an event with adInfo inside you will notice the spike of the CPU and memory allocations.
Additional Info
No response