SfListView low performance

hi all,

I'm migrating my XamarinForm app to Maui and i can see bad performance using listview on android.

On XF it's working properly (android is always slow vs Ios but it accettable).

Moving to Maui the performace is very bad, many seconds in order to load a page even if the layout of the list is easy.

I can see many log messages as 

Explicit concurrent copying GC freed 43331(2070KB) AllocSpace objects, 7(140KB) LOS objects, 49% free, 16MB/33MB, paused 98us,55us total 133.565ms

I don't know if is maui framework or the component.

Can you help me?

thanks


5 Replies

SY Suthi Yuvaraj Syncfusion Team January 11, 2024 01:41 PM UTC

Hi Luca,

We have investigated the issue concerning "SfListView low performance." To gain a clearer understanding, we constructed a basic example that loads a substantial amount of data and conducted an analysis across three different controls: MAUI CollectionView, SfListView, and Xamarin.Forms SfListView. Upon examining the implementations in Xamarin and MAUI, we hypothesize that the underlying cause of the performance issue could be attributed to the MAUI framework. This is because it initiates an additional number of layout calls compared to Xamarin (i.e. measure and layout calls are not the same in MAUI and Xamarin).

Regards,

Suthi Yuvaraj




LU Luca January 11, 2024 10:13 PM UTC

thanks for your check,appreciated!

the problem is that it's impossibile to put in prod an app with this performance. The page load is very slow, oftern many seconds.

i was reading NET8 release notes and i can find:

.NET 8 introduces several new types aimed at improving app performance.

I'm asking myself where are these improvments!

So what we can do/ just wait new releases?

thanks



SY Suthi Yuvaraj Syncfusion Team January 12, 2024 02:01 PM UTC

Luca,

We would like to inform you that despite incorporating the latest improvements from .NET 8 to enhance loading performance with a considerable amount of data, we have identified a persistent lag in the performance of the Framework control, an issue that is also mirrored in the SfListView. Also, we will consider this as a feature enhancement, we will include the fix in any of the upcoming releases, and we will update you once improvements are made. We will appreciate your patience until then.



LU Luca February 25, 2024 04:12 PM UTC

hi all,

it's impossible to migrate a Xamarin form app to MAUI. the performance are very bad. Do you have any suggestion? thanks a lot!



SY Suthi Yuvaraj Syncfusion Team February 26, 2024 03:07 PM UTC

Luca,


We have checked your requirement, Here are some of the steps we have tried to improve the scrolling performance.

.

  1. When SfListView loads a large number of data, invoking the BeginInit and EndInit will improve the performance of the listview. SfListView gets refreshed each and every time a new item is added to the underlying collection. Because, when adding items at runtime, the DataSource gets refreshed. To avoid this behavior, use BeginInit() to stop the calling each time, and use EndInit() to start the RefreshListView calling when adding the number of finished items. We have attached the modified sample and video for your reference.


  1. If you are using the DataTemplateSelector in the sample, setting ItemsCacheLimit will improve the scrolling performance when the datatemplateselector is used,  Based on this value, SfListView creates a number of ListViewItem for different templates in the view if a new template is created while scrolling, and reuses it if same template is used for improving the scrolling performance.

UG Link: https://help.syncfusion.com/maui/listview/viewappearance#data-template-selector


  1. We suggest you set the IsScrollingEnabled property to false, which will load the entire SfListView items, here the ExtendedScrollView will not scroll, loads all the items to the entire height so that the performance is increased where the items are populated on initial loading, and placed inside the interactive scrollable control. Which will improve the scrolling performance.

UG Link: https://help.syncfusion.com/maui/listview/scrolling#listview-with-full-height


Also please refer to the below documentation to improve the performance while loading bulk data

UG Link: https://support.syncfusion.com/kb/article/11517/how-to-improve-performance-when-doing-bulk-changes-in-net-maui-listview-sflistview


Please let us know if you have any concerns.


Regards,

Suthi Yuvaraj.


Loader.
Up arrow icon