Hello,
We have a Entity Framework backed desktop application that we are creating. It has 2 docksites, a ribbon area with several tabs, and a few tabs open in the docksites.
We've noticed a significant performance problem with the docksites. The problem tab will contain a datagrid, with ~400 rows and 8 columns. Each has a ViewModel with an EntityObject. The problem is additive - more cells lead to a longer switching time. Once in the tab, performance is normal. Turning virtualization on the grid doesn't affect this problem.
The problem is when switching between a problem tab and another non-problem tab:
- There is about a 3-second delay switching FROM the problem tab
- There is a memory decrease of about 12MB when switching FROM the problem tab
- There is a 4-second delay when switching TO the problem tab.
- There is a memory increase of about 12MB when switching TO the problem tab
When I profiled it, there appears to be a large amout of time spent in UpdateLayout(). We aren't calling this directly, and I don't see anything in our code that could be causing this problem. The highlighted portion of the sample is purely switching back and forth between tabs 10x via mouse.
I have uploaded 2 screenshots for visual - one is the program, the other is the profile in question (http://www.theimagedepot.com/p377396986) pw: actipro
What I think is that every cell in our datagrid is having something done to it when switching tabs, and I'm really looking for a pointer on how to debug this. With another control we are using, there was a default behavior we could disable when switching focus in tabs that caused a similar delay (switching the tab caused the control to be unloaded, so I disabled that behavior). It also looks like the DockingWindowContainer is spending a lot of time on OnSelectionChanged - is this for the Window, the Tab, or the individual items in the datagrid?
Thanks!