AppLovin / AppLovin-MAX-SDK-iOS

84 stars 69 forks source link

After started loadAd in a MAAdView, there are consequences of main thread occupation which caused UI laggy. #282

Open lovecactus opened 4 months ago

lovecactus commented 4 months ago

Feature Description

We're using the latest AppLovin SDK, with a long list of mediations. However, we noted that after we started to load ads using MAAdView, there was a significant load of the main thread (which eventually caused UI laggy because of the main thread occupation.).

As you can see in the screenshot of instrument logging:

Screenshot 2023-12-21 at 16 15 56

A very high percentage of main thread resources were being used for ALMediationAdapterWrapper. It's not one time but several times in consequences, within seconds, which leads to consequences of slightly, however, noticeable UI freezes.

Is there anything we could do to avoid this?

NanaAmoah commented 4 months ago

Hi @lovecactus we're currently investigating this and will share updates as they become available.

lidorf-gurushots commented 4 months ago

In our application we are dealing with the same issue. Specifically with AppLovinMediationGoogleAdapter adapter that is causing a lot of issues when MERC implemented. Also sometimes the app freezes when initializing the MAAdView..(.main is stuck for unknown reason)

lovecactus commented 4 months ago

Hi @lovecactus we're currently investigating this and will share updates as they become available.

Hi @NanaAmoah

Any update? 😄

NanaAmoah commented 3 months ago

@lovecactus @lidorf-gurushots Apologies for the delay here, we're still investigating the issue and will share updates when we have more details

dillydallygames commented 3 months ago

I'm experiencing the same issue. I hope this gets fixed soon as I can't release to production with a laggy UI. IMHO, this is a critical bug which would undoubtedly lead to 1-star app reviews and upset my customers. Please make this issue a priority.

Gargo commented 3 months ago

@NanaAmoah it is not an "enchancement". It is a bug which causes simulator lags. Even my macbook pro with m2 and 8Gb RAM (which should be enough powerful) has serious lags when I show just a small banner 375x50.

I also found out that calling ALSdk.shared()!.mediationProvider = "max" somehow replaces test ad with another one (and it improves performance)

lovecactus commented 2 months ago

@NanaAmoah Hi, any update on this lag performance issue or a way to walk around? Our app is still affected by this issue. Thanks!