Open jingliancui opened 4 years ago
The performance can be improved by either removing the Bindings or using compiled bindings & the Nursery Size Setting on Android depends on the App, so this has nothing to do with CollectionView
@ValonK Maybe team could update the Microsoft Documents of CollectionView about use these settings for performance.
Adding @roubachof's investigation demonstrating how the GC continues to grow as CollectionView scrolls on Android: https://www.sharpnado.com/gittrends-lags/
I've just tried switching over from ListView to CollectionView and scrolling performance is atrocious.
The performance can be improved by either removing the Bindings or using compiled bindings & the Nursery Size Setting on Android depends on the App, so this has nothing to do with CollectionView
I've switched the layouts to not have bindings in the datatemplates as per the example in https://codetraveler.io/2020/07/12/improving-collectionview-scrolling. It is still unusable... the old list view works considerably better.
@samhouts Do we have news about this issue. Do MAUI will resolve this?
Not really. I tried MAUI CollectionView GA1 (on android), with positive expectations and it is even worse than Xamarin CollectionView. -500 items with 2 labels... very laggy on scrolling I don't understand how this is still a thing
@PureWeen @Redth Hello, are there any progress about this issue on maui ?
A must read for all of those having lag issues with collection views: https://www.sharpnado.com/xamarin-forms-maui-collectionview-performance-the-10-golden-rule/
A must read for all of those having lag issues with collection views: https://www.sharpnado.com/xamarin-forms-maui-collectionview-performance-the-10-golden-rule/
Thanks, however it doesn't explain/solve the poor performance of a collectionview on the first scroll, which is really annoying: https://github.com/xamarin/Xamarin.Forms/issues/14233
well you might want to check rules 2&3 for this one.
A must read for all of those having lag issues with collection views: https://www.sharpnado.com/xamarin-forms-maui-collectionview-performance-the-10-golden-rule/
First rule should be -
Wrap entire DataTemplate
with Frame
.
🤔
Interesting that between implement of xamarin.forms, maui and Sharpnado.CollectionView:
forms:
public class CollectionViewRenderer : GroupableItemsViewRenderer<GroupableItemsView, GroupableItemsViewAdapter<GroupableItemsView, IGroupableItemsViewSource>, IGroupableItemsViewSource>
maui:
public partial class CollectionViewHandler : ReorderableItemsViewHandler<ReorderableItemsView>
Sharpnado.CollectionView:
public partial class CollectionViewRenderer : ViewRenderer<CollectionView.RenderedViews.CollectionView, RecyclerView>
I think every team member from these 3 implement way have different consideration right?
Or I can think it easy that if Sharpnado.CollectionView can pass all the auto test case from Forms and MAUI ? 😂
When CollectionView default instance Scrolling ,it is choppy . I found some one has been improve this control via DataTemplateSelector and Mono Nursery Size Please see it here: https://codetraveler.io/2020/07/12/improving-collectionview-scrolling/?utm_campaign=Weekly%2BXamarin&utm_medium=email&utm_source=Weekly_Xamarin_268 I think it is possible to improve the collectionview performance of scrolling. Thanks.