Skip to content

[Android] CollectionViewwith multiple bindable layouts (CardWithComplexContent) performance issues #21580

@eth-ellis

Description

@eth-ellis

Description

When migrating our app from Xamarin.Forms to .NET MAUI we noticed that for most of our CollectionViews the performance when scrolling was worse.

When new views appeared the CollectionView would stutter/jitter resulting in an unpleasant user experience.

Our item templates are somewhat complex but still worked great in Xamarin.Forms.

In the linked repro apps, we have a template called CardWithComplexContent which is somewhat similar to the template in our app.

Note

Android (Samsung A73) - Xamarin.Forms

Android.-.Xamarin.mp4

Android (Samsung A73) - MAUI

Android.-.Maui.mp4

iOS (iPhone 6s) - Xamarin.Forms

iOS.-.Xamarin.mp4

iOS (iPhone 6s) - MAUI

iOS.-.Maui.mp4

Steps to Reproduce

  1. Checkout .NET MAUI and Xamarin.Forms repro projects.
  2. Build and deploy the apps to your devices in Release configuration.
  3. Run both apps and select either the CardWithTheLot or CardWithComplexContent template.
  4. Compare scrolling performance on both apps (fast scrolling and slow scrolling).

The apps contain other templates for attempting to isolate elements which impact performance the most.

Accepting PRs or suggestions on the repro app repos for templates to add for comparison.

Acceptance Criteria

The scrolling experience on .NET MAUI performs as well as or better than Xamarin.Forms for all affected platforms.

Link to public reproduction project repository

https://github.com/eth-ellis/Issue-Repro/tree/main/CollectionViewPerformanceXamarin and https://github.com/eth-ellis/Issue-Repro/tree/main/CollectionViewPerformanceMaui

Version with bug

Nightly / CI build (Please specify exact version)

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

Metadata

Metadata

Assignees

Labels

area-controls-collectionviewCollectionView, CarouselView, IndicatorViewdelighterdelighter-scmigration-compatibilityXamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convertpartner/cat 😻this is an issue that impacts one of our partners or a customer our advisory team is engaged withperf/generalThe issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf)platform/androids/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions