Preloaded AdMob Interstitial maxes out CPU Usage.

405 views
Skip to first unread message

Vlad Alex

unread,
Jan 14, 2017, 8:23:46 AM1/14/17
to Google Mobile Ads SDK Developers

Hello AdMob forum,

I am experiencing maxing out of the CPU usage after certain interstitials are preloaded with AdMob iOS SDK 7.16.0
(7.14.0 produced the same issue). The CPU usage goes from around 20% to 100% in my case.

Judging by this profiling chart, some JavaScript code is being executed in the background infinitely.



Note that the interstitial is not visible during the maxing out of the CPU usage.

After the interstitial is presented and then dismissed, the CPU usage falls back to normal and remains this way until another similar interstitial is preloaded.

I observe this issue with mini-game interstitials. This one namely:



Video interstitials produce no noticeable increased CPU usage after preloading.

The essence of the problem is this. Since the interstitial is preloaded as soon as possible, it effectively raises the battery usage of the game from "very low" to "very high" for most of the time it's played.

Is there any way to suspend this background JavaScript work since it is obviously not needed when an interstitial is hidden?

Thanks!




Joshua Lagonera (Mobile Ads SDK Team)

unread,
Jan 16, 2017, 10:20:15 PM1/16/17
to Google Mobile Ads SDK Developers
Hi Vlad,

This is most likely a creative issue with the Ad that gets requested and loaded. Would you be able to try the affected Ad Unit ID(s) on our sample apps and verify if you can replicate the issue?
In the meantime, you can try implementing Ad Filters on your AdMob Dashboard and filter out those specific types of ads.

Regards,
Joshua Lagonera
Mobile Ads SDK Team

Vlad Alex

unread,
Jan 22, 2017, 8:19:41 AM1/22/17
to Google Mobile Ads SDK Developers
Hey Joshua,


Thanks for your suggestions. I was able to replicate this behavior in InterstitialExample project from the sample apps.

It's basically the same: when an interstitial with JavaScript minigame is preloaded, it starts consuming large portion of the CPU ( in case of InterstitialExample it's over 50% ) even though it's not visible. See this screenshot - the CPU usage goes from 0 to over 50% each time the interstitial is preloaded ( falls back to 0 once it is shown and dismissed ).



It doesn't seem like initialization, because it continues indefinitely. It seems as if the interstitial is updating even though it's hidden. One would expect of course that it would update only when it's visible. Since normally interstitials are preloaded as soon as possible, updating in the background with such a high CPU usage leads to unnecessary battery drain and degrades user experience. 

Is there perhaps any workaround to stop this background update and run it only when the interstitial is visible?

Thanks.

Veer Arjun Busani(Mobile Ads SDK Team)

unread,
Jan 23, 2017, 10:47:29 AM1/23/17
to Google Mobile Ads SDK Developers
Hi Alex,

I have profiled the same Interstitial and it does spike to 50% usage over WebCore/JS run loops. But this seems to be a creative specific issue and you can certainly block this out via the AdMob dashboard.

Thanks,
Arjun Busani
Mobile Ads SDK Team

SunTemple

unread,
Jan 24, 2017, 1:18:57 AM1/24/17
to google-adm...@googlegroups.com
Hi Arjun,

I also had an impression that this is creative specific issue. But don't you think that you will get this behavior for *all* (or most of the) interstitials with JavaScript animation?

Can't they be prevented from doing their JS run loops when the interstitial is in *hidden* state?

Thanks.

With best regards,
Vlad.

--

---
You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/ZiD2_Nqj2YY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
To post to this group, send email to google-adm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Veer Arjun Busani(Mobile Ads SDK Team)

unread,
Jan 24, 2017, 10:09:07 AM1/24/17
to Google Mobile Ads SDK Developers
Hi Vlad,

The spike only seemed to happen with this particular creative only and the ideal way would be to block it out. However, I will raise this issue with the team to see if this something that can be handled by the SDK.  

Thanks,
Arjun Busani
Mobile Ads SDK Team

To unsubscribe from this group and all its topics, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

SunTemple

unread,
Jan 24, 2017, 11:27:23 AM1/24/17
to google-adm...@googlegroups.com
Hi Arjun,

Thanks. Just FYI - I have seen the same CPU spike with another minigame creative. Hence I thought this is a common issue. But perhaps I was just "lucky".

With best regards,
Vlad.


To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
To post to this group, send email to google-adm...@googlegroups.com.

loukasp...@gmail.com

unread,
Nov 20, 2018, 7:46:58 AM11/20/18
to Google Mobile Ads SDK Developers
I am seeing similar behaviour on various creatives served through the MobileAdsSDK for iOS, mostly in banners, but also in some interstitials.

Do you have any updates on any progress that has been made on the SDK side or the platform where companies upload their creatives, to limit such (javascript overuse) behaviour? 

My app idles at about 25-35% CPU usage with ads enabled, and I have pinned down that its the creatives fault, while with ads disabled it idles at 0-1%, which is really disappointing, considering that mobile apps should be as CPU light as possible to conserve battery.

Blocking the ads is a solution, but I think that profiling the creatives before they are even uploaded would be a more permanent solution, especially for us developers, since the AdMob SDK is supposed to be plug and play, and not something we have control over (i do not have control over the AdMob account of the company I work, I just implement the requirements, which are to implement AdMob ads).

Thank you for your time and consideration.
To post to this group, send email to google-adm...@googlegroups.com.

mobileadssdk-a...@google.com

unread,
Nov 20, 2018, 3:07:56 PM11/20/18
to loukasp...@gmail.com, Google Mobile Ads SDK Developers
Hello Luca, 

Thank you for the feedback. I have shared this with the team. This thread seems pretty old. Feel free to open a new thread if you require any additional assistance regarding this. 

Regards,
Bharani Cherukuri
Mobile Ads SDK Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

To unsubscribe from this group and all its topics, send an email to google-admob-ads-sdk+unsubscrib...@googlegroups.com.

To post to this group, send email to google-adm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/5e52da05-1fb3-48c0-8594-a4be131fe1a0%40googlegroups.com.
Message has been deleted

Mobile Ads SDK Forum Advisor

unread,
Sep 8, 2022, 2:55:21 PM9/8/22
to minhda...@gmail.com, google-adm...@googlegroups.com
Hi Minh,

Thank you for reaching out to us. However, since your concern is specific to flutter, then we would recommend to post your concern to Flutter plugin issue tracker instead. The developer who maintains our flutter plugin should be able to assist you further on your comcern.

Regards,

Google Logo
Teejay Wennie
Mobile Ads SDK Team
 


 

ref:_00D1U1174p._5004Q2dwj2B:ref
Reply all
Reply to author
Forward
0 new messages