googleads / googleads-mobile-flutter

A Flutter plugin for the Google Mobile Ads SDK
Apache License 2.0
335 stars 274 forks source link

Android inline ad performance #269

Closed jjliu15 closed 2 years ago

jjliu15 commented 3 years ago

There have been a number of complaints about performance of inline banner and native ads on Android:

As mentioned in https://github.com/googleads/googleads-mobile-flutter/issues/80#issuecomment-803621668, performance is noticeably worse on Android 9 and below. This is related to use of hybrid composition, which is a requirement due to technical constraints.

Currentworkarounds are to constrict inline ads to android 10 and above, or only to only use fixed position banner/native ads.

maheshj01 commented 2 years ago

@juliancoronado A new stable release occurs every quarter, a fix on master channel would roughly take 5-6 months to land on stable channel Please see https://github.com/flutter/flutter/wiki/Flutter-build-release-channels

maheshj01 commented 2 years ago

@nero-angela, Please consider filing that as a separate issue.

dayron9110 commented 2 years ago

With Flutter 3.0 the performance on iOS is so bad...

ramonpaolo commented 2 years ago

I have the same issue

Out of nowhere, when I open my app, the ad(banner) starts dropping FPS(from 59-60 to 28-29). The performance improves, when I remove the Banner from the Widget tree (the Banner is pinned to a bottomSheet)

I'm using Flutter verion 2.10.4 * channel stable with google_mobile_ads: 0.13.6

Edit: I'm using now:

google_mobile_ads: 
    git:
      url: https://github.com/SuaMusica/googleads-mobile-flutter.git
      path: packages/google_mobile_ads
      ref: feature/suamusica

and it looks like the performance issue is gone

iqfareez commented 2 years ago

@ramonpaolo Try upgrading to Flutter 3

euphio commented 2 years ago

The obvious solution to this appears to be implementing a native flutter (widget) ad container rather than relying on Platform Views.

Flutter platform views evidently aren’t performant enough at present to support native ads (https://github.com/flutter/flutter/issues/107486#issuecomment-1189426546), particularly in a ListView which is one of the documented usages of displaying Native Advanced ads.