SfListView significantly scrolling lag on android.

My Template is nothing complex just some text and image as attached.
Each item in the listview is a box something like facebook or instagram.

On standard xamarin.forms listview with this item template, scrolling is perfectly smooth.
But with the same template on sflistview on android. I can feel significant stutter and lag when scrolling.
I've tried this on many high-end android devices "xperia x, xperia xz, galaxy S8, Huawei P10" all has significant scrolling lag compared to standard xamarin.forms listview.

Attachment: lag_c9c95a36.zip

5 Replies

DB Dinesh Babu Yadav Syncfusion Team January 15, 2018 06:37 AM UTC

Hi Kittipat 
 
Sorry for the inconvenience. 
 
We have checked the reported issue “SfListView does not have smooth scrolling” at our end and we could able to reproduce the issue in Android platform when the images with larger size and high resolution are loaded in ItemTemplate property.  
  
In Android platform:  
  
We have analyzed the Scrolling performance with framework and found that, in android the native objects are created for each images load in ItemTemplate of SfListView when update the BindingContext of ListView item while scrolling. So scrolling gets affected when load two or more images in each item. This is due to the fact that the Android Mono Framework collects the minor garbage whenever the live objects count in the current application exceeds a threshold which causes a temporary glitch pausing the application for few milli-seconds which is unavoidable in the android development. Thus the only way to resolve the minor garbage collection is to reduce the live object count which is currently not possible for a component like ListView that has to handle certain functions mandatorily to render its view. Further when loading complex layout in the template that contains images or nested containers, the Android System and the Xamarin framework takes its time to render them in view. This largely depends on the views that used in template and the CPU of the Android device that the application is being deployed.   
  
So, we suggest you to use images with less size and resolution to achieve the maximum performance.    
 
Also, we regret to inform that the reported issue “Smooth scrolling does not occur in Android platform” is a framework issue and we have logged a defect report to Bugzilla team. The issue is caused when the Garbage Collection(GC) is collected as mentioned earlier. We will let you know once the Xamarin team provides any solution or workaround to fix the GC collection. You can follow up the same from the below Bugzilla link.  
  
  
Meanwhile we are also analyzing the possibilities to remove it from our side by any workaround and will let you know if found any possible solution to overcome it. 
  
Also, could you please share the below information’s? which would help us to analyze the issue better and update you an appropriate solution.  
  
  • Whether the issue replicates only in Android platform or in other platforms too?
  • Could you please share the View loaded in ItemTemplate property? If possible, please replicate the issue in a sample and revert us.
 
Please let us know if you require further assistance. 
 
Dinesh Babu Yadav 
 



RO Robert November 8, 2019 09:29 AM UTC

Hi, I have same issue. My large list(200 items) does not work smoothly when scrolling. there are no images in it. text only. Any news?


GP Gnana Priya Namasivayam Syncfusion Team November 11, 2019 10:14 AM UTC

Hi Robert, 
  
We would like to inform you that listview will scroll smooth as expected. We are not clear about the use case in which you are facing the reported issue. Can you please share more details like listview loaded Item template related snippets and AutoFitMode options used ?.

This above details will help us to analyze the reported issue in order to provide a better solution at our end.
 
  
Regards, 
Gnana Priya N 



RO Robert December 13, 2019 11:23 AM UTC

Hi, I use "AutoFitMode="Height" for SfList. I created test project(in attach file). Scrolling in version for iOS works more "smoothly" than version for Android.


Attachment: TmpList_926ca9a1.zip


GP Gnana Priya Namasivayam Syncfusion Team December 16, 2019 08:38 AM UTC

Hi Robert, 
 
We have checked the attached sample from our side. We would like to inform that Listview in the sample scrolls, flings as expected. We suspect due to have same names in the collection you feel like scrolling lags and also we have achieved the scrolling performance in Android & iOS as per native platform behaviors only. Difference in Android and iOS is due their respective platform specific behavior. 
 
Regards, 
Gnana Priya N 


Loader.
Up arrow icon