Advertisement
Beginner .NET MAUI, Performance & Optimization

What are quick wins for improving MAUI list performance?

Short answer

Use CollectionView (virtualized) over ListView; keep item templates shallow; enable compiled bindings with x:DataType; avoid nested layouts inside cells; and size images appropriately. Flat, simple templates recycle faster and scroll more smoothly.

Save .NET MAUI mock interview
Advertisement
AModel answer
Use CollectionView (virtualized) over ListView; keep item templates shallow; enable compiled bindings with x:DataType; avoid nested layouts inside cells; and size images appropriately. Flat, simple templates recycle faster and scroll more smoothly.
<CollectionView ItemsSource="{Binding Items}" x:DataType="vm:PageVm">
    <CollectionView.ItemTemplate>
        <DataTemplate x:DataType="m:Item">
            <Grid Padding="12"><Label Text="{Binding Name}" /></Grid>
        </DataTemplate>
    </CollectionView.ItemTemplate>
</CollectionView>
Real-world example
Flattening a three-level nested cell into a single Grid noticeably smooths scrolling on low-end Android devices.
Likely follow-ups
  • Why do shallow templates help? | How do compiled bindings improve speed?
Related topics