Are there tips and tricks that will make the CollectionView control more responsive on mobile devices?

dg2k 1,416 Reputation points
2022-11-21T09:33:51.63+00:00

I like the rich features of CollectionView but I find it a bit sluggish, for example, on Android (Maui). I use the Grouped listing feature to categorize list items with Group Key and that is when I start to notice performance issues.

I have gone through the documentation. Are there tips and tricks outwith the documentation that I can consider to make CollectionView more responsive?

Developer technologies | .NET | .NET MAUI
0 comments No comments
{count} votes

Answer accepted by question author
  1. Anonymous
    2022-11-22T05:56:23.587+00:00

    Hello,

    Here are some tips that you can refer.

    We should avoid a nested view and try to create a flat view wherever possible. Nested view reduces CollectionView performance. For example, add vertical CollectionViewin horizontal CollectionView.

    CollectionView is rendererd by AndroidX.RecyclerView.Widget.RecyclerView in Native Android. If the height of all the items is equal. Set recycleView.HasFixedSize = true; in CollectionViewHandler.

    Here are tips from Xamarin offical document Improve Xamarin.Forms App Performance. But some tips are working in MAUI. Such as following topics: Reduce unnecessary, Choose the correct layout bindings, Optimize layout performance, Use asynchronous programming and Reduce the visual tree size.

    Best Regards,

    Leon Lu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.