Experiencing poor app performance or stuttering animations in a long list view with images.
Hi, I'm facing poor app performance or stuttering animations in a long list view with big images when place ads in between the list. If I remove the ads the scrolling is smooth. Please advise.
Hi @ko2ic you can wrap the platform channel code with new thread rather than using main threat. For example:
@Override
public void onMethodCall(MethodCall call, Result result) {
if (call.method.equals("sleep")) {
new Thread(new Runnable() {
public void run() {
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
e.printStackTrace();
}
result.success("Good morning!");
}
}).start();
} else {
result.notImplemented();
}
}
Can confirm this is a big issue as it breaks the smooth behavior of an application.
When scrolling through a ListView.builder which contains ads every nth item, the Choreographer complains:
I/Choreographer( 7590): Skipped 33 frames! The application may be doing too much work on its main thread.
At 60fps that is 550 milliseconds of frozen view during an animation.
I've tried to add threading but it's not that simple. The PlatformView cannot be modified from a different thread than the one it was created from, so moving the hard word in the methodcall to a separate thread (not the main thread) breaks because the PlatformView needs the main thread.
I've placed some simple milsecond meassures and most of the time seems to be in the loadAd call. Which is odd because according to docs it is supposed to do it's work in a background thread. https://developers.google.com/android/reference/com/google/android/gms/ads/doubleclick/PublisherAdView#loadAd(com.google.android.gms.ads.doubleclick.PublisherAdRequest)
I tried running on dev channel of flutter with v1.8.0, certainly it fixes the low performance issue but on plugin side the ads are not displaying the images. It just not showing any image, it's blank but onClick is working. Please update the plugin to support flutter v1.8.0. Thanks.
@theneshofficial That sounds like a separate, but very important/breaking, issue. I think you should open a new issue for that, perhaps with a screenshot.
I am also having this issue, is there any update on how to fix this?
Did anyone found any solution to the poor performance issue? I also have a problem with stuttering scroll when implementing multiple banners.
I could not find a solution to this problem, and as a result, this issue is stopping us from releasing an iOS application. The team I work for had to start making a native iOS application. I am hoping that this gets resolved.
Is this plugin still updating? This bug is problematic, and stopping me from releasing an app to the stores. Can anyone come with a solution for this?
Any updates on this please
Does this plugin https://pub.dev/packages/pigeon from flutter team help to solve the issue? I guess might improve the communication between platform channels. Worth trying.