Hi Philip,
Below is a forum thread that discuss with the similar issue.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=32767When you use the debug builds for Essential Grid, you will get a trace message that indicates how many items are in the volatile data cache.
Here is the code for SetItem
public void SetItem(GridCellPos cell, GridStyleInfo style)
{
try
{
if (data.Count >= forceGcCollect)
GC.Collect();
#if DEBif (data.Count > maxDataCount)
{
Console.WriteLine("VolatileData HashTable: " + data.Count.ToString());
maxDataCount = data.Count + data.Count/10;
// let's just show a Trace statement for larger increases ...
}
#endif
data[cell] = new WeakReference(style);
}
catch (InvalidOperationException ex)
{
// should be InvalidOperation_HashInsertFailed=Hashtable insert failed. Load factor too high.
TraceUtil.TraceExceptionCatched(ex);
Trace.WriteLine("Detected too many items in volatile date hashtable. You should set GridVolatileData.forceGcCollect to a value below " + data.Count.ToString());
TraceUtil.TraceCurrentMethodInfo("Hashtable count: ", data.Count);GC.Collect();
TraceUtil.TraceCurrentMethodInfo("Hashtable count after GC.Collect: ", data.Count);
data[cell] = new WeakReference(style);
}
}
The exception itsself is handled by an exception handler and resolved when it happens. Basically what I need to do is force a call to GC.Collect.
If you have source code than you could change the value for forceGCCollect to be less than what is written out.
The error can happen in rare cases when more items are cached than the Hashtable can hold. This is when you do a extensive operation and GC is not called for a while or when you keep references to the style objects and therefore the GC can not release the objects.
Try checking this issue in any one of our latest version. Please refer the link below for the download details of the latest version.
http://www.syncfusion.com/downloads/latestversion/default.aspxFYI, we have added many new features and samples to our latest version. Performance of gridgroupingcontrol has been increased.
Best regards,
Haneef