Winform Databinding Performance

Winform Databinding Performance

Old forum URL: forums.lhotka.net/forums/t/3107.aspx


Cslah posted on Wednesday, June 27, 2007

I'm finding some performance threads on the group here but not like I'd expect with what I'm experiencing, which leads me to believe I'm missing something slap-myself-in-the-forehead-obvious.

 

I'm binding a collection (BusinessListBase) to a winform DataGridView using Csla 2.1.4. I've only had to trap a few events to make it behave well and I generally have liked everything, until I load the collection with some records. Performance is to the point of my app being unusable. Even with something as small as 400 objects in the collection, it takes 10 seconds for the winform to pop up. If I load a collection with 1000 items it's unusable as it takes almost 45 seconds to load.

 

In tracking this down I've uncommented one line of code to find the bottleneck:

 

MyBindingSource.DataSource = MyCollection

 

The collection loads (even with 1000 items) in a few seconds. This one line of code kills everything else.

 

I've tried several things:

Does anyone have any recommendations on how to improve databinding performance?

 

Copyright (c) Marimer LLC