Xamarin form: Memory usage defining datatemplate in App.xaml file

87 Views Asked by At

If I define a data template in App.xaml instead of in Page.xaml or inside ListView, will it increase the memory usage as a whole?

1

There are 1 best solutions below

0
On

No, it should not increase the memory usage as a whole.

Defining things within App.xaml increases your app's startup time since the app has to load everything in the App.xaml page when the app first runs.

If you are using the same DataTemplate on multiple pages though, defining it within App.xaml could increase performance overall.

You could try out the Xamarin Profiler to find out for yourself what the differences are (requires Visual Studio Enterprise Subscription).