High cpu on showing admob Ad

155 views
Skip to first unread message

wave hi

unread,
Aug 9, 2022, 10:01:51 AM8/9/22
to Google Mobile Ads SDK Developers
Hi Teams

We just got a high CPU problem when showing the ad with Admob(version 9.7.0) for iOS ( iOS 15). it takes over 10 percent CPU, even though we didn't do anything about the UI(scrolling and refreshing).  We find the same problem with the sample of Admob. It costs a lot of CPU.  https://github.com/googleads/googleads-mobile-ios-examples

image_2022_08_09T10_46_58_357Z.png

Any ideas about this problem would be greatly appreciated.

Thanks,
Haibo



Mobile Ads SDK Forum Advisor

unread,
Aug 9, 2022, 2:17:27 PM8/9/22
to wave20...@gmail.com, google-adm...@googlegroups.com
Hi Haibo,

Thank you for raising this to us.

In order for us to check this further, could you please provide/confirm the following via Reply to author option?
  • Is the issue only occurs on the iOS 15 with the latest version of the SDK?
  • As per checking on your screenshot, I could see that you're using our API demo sample app. Could you please share what ad format / page that you were accessing on the demo app?
  • Please share to us the instruments recording 
  • AdMob app ID
Regards,
Google Logo
Teejay Wennie
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2dIuY9:ref

wave hi

unread,
Aug 10, 2022, 10:57:20 PM8/10/22
to Google Mobile Ads SDK Developers
Hi Teejay Wennie
  • Is the issue only occurs on the iOS 15 with the latest version of the SDK?(It happens a few version(9.2-9.8) that we have tested, iOS 15 and iOS 14.5)
  • As per checking on your screenshot, I could see that you're using our API demo sample app. Could you please share what ad format / page that you were accessing on the demo app?Simulator Screen Shot - iPhone 13 - 2022-08-11 at 10.06.17.pngimage_2022_08_11T01_50_10_850Z.png
  • Please share to us the instruments recording (Please see it in the attachment)
  • AdMob app ID (Do you mean adUnitID?  it is "ca-app-pub-3940256099942544/2934735716")
Thanks ,
Haibo
adsproformance.trace.zip

Mobile Ads SDK Forum Advisor

unread,
Aug 11, 2022, 3:18:42 AM8/11/22
to wave20...@gmail.com, google-adm...@googlegroups.com

Hi Haibo,

Thank you for your response.

Can you confirm if this high CPU usage is only happening in the actual device? Upon checking your trace, I've seen that the CPU usage is only high on the beginning of the app, which might be because some ads are being requested. Can you provide us with your screen recording of how you tested this in your app, so that we can further check it in our end? You can provide it to the link below.

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files with me by performing the following steps:

1. Navigate to https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=Mobile+Ads+SDK&entry.460850823=5004Q00002dIuY9QAK&entry.80707362=00116710
2. Fill out all fields, and attach your file(s).
3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.

Regards,

Google Logo
Princess Pamela
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2dIuY9:ref
Message has been deleted

wave hi

unread,
Aug 12, 2022, 12:03:46 AM8/12/22
to Google Mobile Ads SDK Developers
Hi Teams

 Thank you for your help. Sorry about the link.

It not only happens in the device but also happens in the simulator. We think the CPU usage should be 0 or a little bit after the Ads have been loaded. but actually, it is about 3-7 CPU usage. It costs too much CPU usage.  Please take a look at the video about the process in the attachment.

Thanks,
Haibo

On Thursday, August 11, 2022 at 3:18:42 PM UTC+8 mobileadssdk wrote:

Hi Haibo,

Thank you for your response.

Can you confirm if this high CPU usage is only happening in the actual device? Upon checking your trace, I've seen that the CPU usage is only high on the beginning of the app, which might be because some ads are being requested. Can you provide us with your screen recording of how you tested this in your app, so that we can further check it in our end? You can provide it to the link below.

Regards,

adcpu.m4v

Mobile Ads SDK Forum Advisor

unread,
Aug 12, 2022, 2:57:52 PM8/12/22
to wave20...@gmail.com, google-adm...@googlegroups.com
Hi Haibo,

Thank you for getting back to us.

I've checked the screen recording and can see a CPU usage of 1% on the app. However, please do note that the debug session does not tell if the whole 1% where came from the SDK itself. In addition, 1% is also acceptable as the creative asset itself being displayed as ad takes phone's resources. 

For the simplicity of testing, I've used our banner sample app instead (please see attached screen recording). At the first 10 second mark, you can see that the CPU spike to 40% quick which is expected as the SDK were initializing and send an ad-request to the ad server. From 11 to 1min 19sec mark, you can see that the CPU usage stays on 0% to 1%. This usage where came from the creative asset itself.  At 1min 20sec mark, you can see that the banner refreshes and request for another ad which takes 14% usage, then quickly down to 0%. This is also normal as the SDK requires phone's resources to request an ad and load it to the layout.

To summarize this, the SDK will still take phone's resources, but not that much that can affect your app. This is a working-as-intended behavior of the SDK.

Regards,
Google Logo
Teejay Wennie
Mobile Ads SDK Team
 
 

ref:_00D1U1174p._5004Q2dIuY9:ref
Screen Recording 2022-08-13 at 1_41_06 AM_mov.html
Reply all
Reply to author
Forward
0 new messages