I need to bind hundreds of thousands of objects to TreeListView, potentially up to ~1-1.5 million at peak. Right now on my test set binding 350k of those objects takes 15-20 seconds. Is there any way to achieve at most a few seconds performance?
I am working with existing data structure that is not homogeneous: root rows in my tree are objects, child roots are their fields which could also be potentially objects. They also can cross-reference each other, so creating all the structure at once would lead to endless recursion, that's why child rows are only created when the root is expanded. I don't think this actually matters much in this case, as I am talking about hundreds of thousands of root rows, they will be collapsed by default and expanded only one by one.
But this means I have a slim wrapper around my initial data to create a class suitable for TreeListView binding which makes data homogeneous. There are only 5 columns/properties, and creating all of those objects and a bindable collection of them only takes ~1 second in my code, it seems that the rest is spent "pushing" data to UI.
Another important thing is I just need to display a "snapshot" with that much data, it's static, there will be no changes to the collection, only manual editing of cells values user can perform (wrapper implements INotifyPropertyChanged). I tried adding a range of items at once with suspended notifications, recreating bindable collection from a previously prepared list each time it's loaded, but they all seem to offer the same 15-20 secs performance on a 350k set. Even then scrolling, roots expanding and filtering performance is terrible.
I was looking at VirtualQueryableCollectionView, but as I understand, it doesn't work with local data, for example, from a list? Pagination is also something I was looking at, but then search/filtering only works within current page. Is there anything else I can do to make it faster?