using System.Collections.ObjectModel;
using System.Diagnostics;
namespace DatatTemplatePerfIssue;
public partial class Table : ContentView
{
public Table()
{
InitializeComponent();
}
public void Load()
{
ObservableCollection<Col> cols = new ObservableCollection<Col>();
for (int i = 0; i < 7; i++)
{
cols.Add(new Col("Title" + i));
}
ObservableCollection<Row> rows = new ObservableCollection<Row>();
for (int i = 0; i < 5; i++)
{
rows.Add(new Row("Row " + i, "Description " + i, cols));
}
BindableLayout.SetItemsSource(Rows, rows);
}
}
Description
As you can see below, I try to load the same view 3 times, and it take more and more time to load...
https://github.com/dotnet/maui/assets/9884985/77d0993e-9533-499d-87b2-f14de91a6820
==> It's running on Release mode ! (On debug i can take my shower, eat, sleep...)
I really don't know if it's a bindablelayout issue or DataTemplate.
Steps to Reproduce
MainView :
Link to public reproduction project repository
https://github.com/PauchardThomas/MauiBindableLayoutPerfIssue
Version with bug
8.0.3 GA
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No
Relevant log output
No response