0
votes

I have a problem with performance with Catel ViewModels.

I have a ListView with ~300 items. Each of item has its own UserControl and ViewModel. ViewModel has Model property which is a constructor's parameter.

It least ~10seconds to create 300 ViewModels, which are not complicated.

Is it common problem? How should I handle that?

1
how big are your VM an V? and could you please show your code for creating and holding your ListView items?WiiMaxx
My ViewModel contains 2 commands and 1 property - so its small. Model contains only 3 properties. I was creating VMs on a Initialized event of a parent view model. Simply with a constructor with Model parameter.Tomasz

1 Answers

0
votes

Please take a look at the performance considerations when using lots of views / view models:

https://catelproject.atlassian.net/wiki/display/CTL/Performance+considerations