Appodeal init causes lag!

Since I last wrote on this thread I bought a 6.0.1 ZTE device (cheap pos) and had the opportunity to play with a Galaxy S6 with 6.0.1. I did not experience any lag on either of these devices with my app.

The lag is only noticeable when you see animations in the game (they start to stutter). Did you try to implement the Appodeal Plugin in - for example - one of the physics sample projects provided by Corona? I could clearly see the physics stuttering for the first 5-7 seconds after the start of the app (where I call the init() function of the Appodeal Plugin).

Hey Nico.

I noticed in your sample app that you are also calling .show() after the init event, so this isn’t actually an issue with the init call. The slowdown happens when the banner ad is on screen.

This is a common occurrence with banner ads (especially animated banner ads). They consume a lot of CPU power and that is why most providers explicitly state in their best practises guides to not use banner ads during gameplay.

They advise that banner ads should be shown in places like menus, end of level screens, pause menus and so on.

I would also advise that you call init() as soon as possible so you have ads available (cached) as needed.

For best performance on Android 6.x devices, you should also request the write external storage permission via the native.showPopup() api: https://docs.coronalabs.com/daily/api/library/native/showPopup.html#requestapppermission - That allows the ads to be cached on the device, rather than streaming on demand.

Thanks

Hi Danny,

have you tried to remove the show() function, so that you just have the init() function? Yes, the banner causes lag,  but the init() function alone causes lag as well for me.

Greetings

I have indeed Nico. 

I did not notice much lag at all. Possibly a second or two at most.

Again, init() should not be called during gameplay for any ad plugin that caches ads for you automatically. It should be called as soon as possible after starting your app so it has pulled down and cached the ads it needs to function before you start your game.

Be sure to request access to the permission I stated above also, otherwise ads won’t be able to be cached on disk and will therefore result in more CPU consumption.

Native developers would also experience the same thing with ad providers of this nature. 

Hello Danny,

I am sorry to tell you, but I did notice lag the first 5-7 seconds, not 1-2… And I know that you have to call the init() early in the game, this is why I have included a splash screen, since the main menu already has animations. This works fine for other Ad Plugins but I cannot extend the splash screen to such durations because of Appodeal alone.

Please try to make the init() faster in any way. It works with the other Ad Plugins as well…

Hello Nico.

There isn’t anything we can do to make init() faster. Appodeal isn’t like other Ad plugins, it has a lot more work to do during its initialisation process (the Appodeal SDK initialisation process, not our plugins init() function) than other plugins.

If we disable caching for Appodeal, then you will just be shifting the loading process from startup to when you want to show the ad.

This also goes against their recommended implementation. 

My point is that we aren’t doing anything extra that could cause this, we are simply calling the Appodeal SDK methods that have to be called during its initialisation. 

Hello Danny,

what about disabling caching and implementing a load() functions like many other ad plugins have one, so that you can decide yourself when to load the ads (preferably during an in-game loading screen, or a static part with no animations)?

The reasons this wasn’t implemented are:

  1. Their docs state their best practise is to let them handle ad loading for maximum impressions/revenue.

  2. Disabling caching and manually loading ads simply did not work during my testing of that feature during development

Thank you