GGC sort and GDI Objects

Hi,
With the GGC, when we sort by column by clicking on a header column, the number of
GDI objects increase and is never released !

Is there a way to correct this.

Thanks

SImon


3 Replies

SR Sri Rajan Syncfusion Team September 8, 2008 10:56 AM UTC

Hi Simon,

Thank you for your interest in Syncfusion products.

For GridGroupingControl, there are some standard optimizations that need to be set, which will let you speed up the grouping engine and correct such performance problems, when many rows are present. Please try the following optimization settings for your GridGroupingControl.

void OptimizeGridSettings(GridGroupingControl grid)
{
grid.CounterLogic = EngineCounters.YAmount;
grid.AllowedOptimizations = EngineOptimizations.DisableCounters | EngineOptimizations.RecordsAsDisplayElements;
grid.UseDefaultsForFasterDrawing = true; // GDI interop drawing, FirstNRecords Summaries
grid.InvalidateAllWhenListChanged = false; // only paint modified cells
grid.InsertRemoveBehavior = GridListChangedInsertRemoveBehavior.ScrollWithImmediateUpdate;
grid.UpdateDisplayFrequency = 50; // update every number of ms (speciy 0 if Update should occur manually, 1 if immediately)
//grid.TableControl.EnableDoubleBufferSurface(); // reduce flickering

// Instruct grouping control not to access datasource through
// CurrencyManager API and instead access list diretly. When set to
// false you wil howver loose support for built-in CurrencyManager
// synchronization.
grid.BindToCurrencyManager = false;
}

Take a look at the performance based samples in GridGroupingControl from the shipped browser samples
\Syncfusion\EssentialStudio\5.2.0.25\Windows\Grid.Grouping.Windows\Samples\2.0\PerformanceSamples\

Also you could try GridGroupingGrid.Engine.AllowCacheStyles and Enable this flag if you want GridRecordRow and GridCaptionRow elements to keep a cache with style information for individual cells and reduce the number of QueryCellStyleInfo calls being raised for these cells.

Other things you could look at is overriding Table.ShouldCacheRecordData.

Here is how the base class version looks like:

///
/// Method is called when the table tries to determine whether a record''''''''''''''''s underlying data row can be cached
/// within objects.
///
/// True if record''''''''''''''''s underlying data row can be cached
/// within objects; False otherwise.
protected virtual bool ShouldCacheRecordData() // called when SourceList is changed
{
return ((SourceList) is IGroupingList) && ((IGroupingList) SourceList).AllowItemReference || SourceList is System.Data.DataView;
}

Another setting is Engine.AllowSwapDataViewWithDataTableList. It Gets / sets if the engine can wrap access to a DataTable with a which provides optimized access to the rows of the datatable. Engine will access a DataTable through this wrapper class instead of accessing records through the DataTable.DefaultView to increase performance when adding, removing, and changing records when Engine.AllowSwapDataViewWithDataTableList is enabled. Default is False. --- but that should normally not affect scrolling.

Please let me know if this helps,

Best Regards,
Srirajan.



SK Simon Kakon September 8, 2008 11:19 AM UTC

Thank's for your response.
I have already set these properties but it's not working.

For information I use The UseOldListChangedHandler to true.

Thanks


>Hi,
With the GGC, when we sort by column by clicking on a header column, the number of
GDI objects increase and is never released !

Is there a way to correct this.

Thanks

SImon





SR Sri Rajan Syncfusion Team September 9, 2008 09:11 AM UTC

Hi Simon,

Thank you for your interest in Syncfusion products.

This issue was fixed in our latest version. Please download our latest version from the below link.

http://www.syncfusion.com/downloads/latestversion/default.aspx

For Unlock key email to [email protected]

Best Regards,
Srirajan.


Loader.
Up arrow icon