You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello.
I am loading multiple native ads using GADAdLoader.
The loaded GADNativeAds are retained in an array as properties within my class.
Even when the ads are not displayed on the screen, just retaining the instances is causing CPU usage.
Typically, with five instances, the main thread continues to use about 20%.
Since I am loading and retaining 15 ads in my app, about 60% is constantly in use.
I have confirmed this by debugging on a real device.
Also, when I checked with Instruments, it seems that the AVAudioSession.currentRoute is being checked at a frequency of about every 0.2 seconds, and this appears to be the cause.
Is GADNativeAd the one checking this?
Is it possible to turn this off or make a fix?
I believe this has been occurring since quite an earlier version.
I have confirmed that it occurs even in version 11.5.0 of the Google-Mobile-Ads-SDK as well as in the latest version 11.9.0.
I am installing it via CocoaPods.
Additionally, I checked the example repository just in case, and the same phenomenon occurs.
In this code, since it retains only one instance, the impact is minimal, but when modified to load and retain multiple instances, it occurs.
// let options = GADMultipleAdsAdLoaderOptions()// options.numberOfAds = 5
I would appreciate it if you could look into this when you have time.
The text was updated successfully, but these errors were encountered:
s2mr
changed the title
Consuming CPU continuously with the number of active GADNativeAd instances
[BUG] Consuming CPU continuously with the number of active GADNativeAd instances
Sep 16, 2024
Hello.
I am loading multiple native ads using GADAdLoader.
The loaded GADNativeAds are retained in an array as properties within my class.
Even when the ads are not displayed on the screen, just retaining the instances is causing CPU usage.
Typically, with five instances, the main thread continues to use about 20%.
Since I am loading and retaining 15 ads in my app, about 60% is constantly in use.
I have confirmed this by debugging on a real device.
Also, when I checked with Instruments, it seems that the AVAudioSession.currentRoute is being checked at a frequency of about every 0.2 seconds, and this appears to be the cause.
Is GADNativeAd the one checking this?
Is it possible to turn this off or make a fix?
I believe this has been occurring since quite an earlier version.
I have confirmed that it occurs even in version 11.5.0 of the Google-Mobile-Ads-SDK as well as in the latest version 11.9.0.
I am installing it via CocoaPods.
Additionally, I checked the example repository just in case, and the same phenomenon occurs.
In this code, since it retains only one instance, the impact is minimal, but when modified to load and retain multiple instances, it occurs.
https://github.com/googleads/googleads-mobile-ios-examples/tree/main/Swift/advanced/SwiftUIDemo/SwiftUIDemo/Native
I would appreciate it if you could look into this when you have time.
The text was updated successfully, but these errors were encountered: