Normal 0 false false false EN-US X-NONE X-NONE
Hello folks,
Though CSLA works quite nicely with smaller datasets I am seeing a performance issue when accessing larger data sets. In particular I have a CSLA Read Only List Object that in some cases could contain over 19K child elements. In these cases, I am observing that Csla.ReadOnlyBase.LoadProperty chews up majority of time (in reflection) when building the list; and of course, this significantly impacts performance!
{To the interested reader – the profiling data is given below}
Has anyone seen this performance issue before?
Has this been fixed in the framework (I am currently using CSLA Ver 4.0.1.0) or is there a workaround?
Here’s the stack
Function Name | Inclusive Samples | Exclusive Samples | Inclusive Samples % | Exclusive Samples % | Module Name | ||
| 6,562 | 1 | 96.01 | 0.01 | MiddleTier.Library.DLL | ||
| 6,561 | 32 | 95.99 | 0.47 | MiddleTier.Library.DLL | ||
| 5,544 | 43 | 81.11 | 0.63 | Csla.DLL | ||
| 1,633 | 1,633 | 23.89 | 23.89 | mscorlib.ni.dll | ||
| 1,603 | 1,603 | 23.45 | 23.45 | mscorlib.ni.dll | ||
| 1,164 | 908 | 17.03 | 13.28 | mscorlib.ni.dll | ||
| 929 | 334 | 13.59 | 4.89 | System.Core.ni.dll | ||
| 595 | 222 | 8.71 | 3.25 | Csla.DLL | ||
| 570 | 50 | 8.34 | 0.73 | Csla.DLL | ||
| 413 | 9 | 6.04 | 0.13 | Csla.DLL |
And the function that takes up time
protectedvirtualvoid LoadProperty(IPropertyInfo propertyInfo, object newValue)
{
var t = this.GetType();
var flags = System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance;
var method = t.GetMethods(flags).Where(c => c.Name == "LoadProperty"&& c.IsGenericMethod).FirstOrDefault();
var gm = method.MakeGenericMethod(propertyInfo.Type);
var p = newobject[] { propertyInfo, newValue };
gm.Invoke(this, p);
}
thanks,