Member Variables with Databinding Problem

Member Variables with Databinding Problem

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


bcrowell posted on Tuesday, July 29, 2008

By convention, my company uses member variables inside our objects whenever possible. We've just completed upgrading our solution to the 3.5 framework based on the sample code in the ProjectTracker app which appears to NOT use member variables whenever possible. I found one class where it does so I used that as a template to modify our classes. Unfortunately, all data binding on these objects is now very slow. In fact it's practically unusable. It takes up to 5 seconds for a variable change to manifest itself outside.

I then changes back one of the classes and now it's databinding is back to normal. Can anyone shed some light on this. Should we not be using member variables? Is there a work around for this performance issue with databinding? Thanks.

Byron

ajj3085 replied on Tuesday, July 29, 2008

Using fields shouldn't slow down data binding at all, unless something goofed on the conversion.  What version of Csla were you using prior to upgrading to 3.5?  I've upgraded, but the large portion of my application still uses the private field style of coding, not the newer Managed fields.  I haven't noticed any databinding problems..

Usually slow databinding is a result of excessive propertychanged events being raised.  That would be the first thing I would attempt to eliminate as a cause of the speed issues.

Copyright (c) Marimer LLC