Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1360
Xamdatagrid Adding Large Number of Summaries Slow
posted

Hello,

We need to add around 4000 summary values to the xamdatagrid and we have changed the summary calculation to lazyloading which is great, but this is not my problem now.

The problem is that using the Add method of the SummaryDefinition object is VERY slow even when I use a key for each summary. Using reflector I can see that the likely reason for this is that you are not using a dictionary to check if the key already exists, you are iterating through the entire collection checking one at a time to see if the key matches. Using a timer I can see this gets progressively worse from zero milliseconds when adding the first summary, but takes around 25 milliseconds by the end of my 4000 items.

When you add this up it takes almost a minute to simply add my summaries even though they aren't actually calculating yet.

Do you have ANY advice on how to avoid this costly Add method or am I doing something wrong.

 

Regards,
Doug Rees

Polo Ralph Lauren.