Developer Docs - Mobile Docs - Performance
As you get comfortable with XAML you'll start to see the power of what you can achieve. With this power comes the responsibility to understand the performance implications of your actions. Each view (Grids, StackLayouts, Labels, etc.) adds overhead to the page as it is rendered. You'll want to make sure you limit how many views you add.
Layouts
The most important aspect of layout-level optimization is knowing when you should be using which layout. As a XAML developer, you should be aware of how each of these layouts work and what the drawbacks are of using each of them.
StackLayout
Link
AbsoluteLayout
Link
RelativeLayout
Link
Grid
Link
You should use a Grid control instead of nested StackLayouts when you need to create a more complex layout with multiple rows and columns. The Grid control provides a more efficient way to define layouts that have a complex grid structure, with items aligned in both rows and columns.
Using nested StackLayouts can be a viable option for simple layouts with only a few items, but it can become cumbersome and inefficient when the layout gets more complex. For example, if you need to align items in both rows and columns or span items across multiple rows or columns, it can be difficult to achieve this with nested StackLayouts.
As for the performance impact, using a Grid control is generally more efficient than using nested StackLayouts for complex layouts. This is because the Grid control uses a more optimized layout algorithm that is specifically designed for aligning items in both rows and columns. In contrast, using nested StackLayouts can result in more complex layout calculations, which can be slower and more resource-intensive. However, for simple layouts with only a few items, the performance impact of using nested StackLayouts versus a Grid control is likely to be negligible.
Display Collections
ListView
https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/listview/
Controls ^^^
Images
https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/images?tabs=windows
Labels
https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/text/label
Additional Resources