Grid Speed
Our GridGroupingControl is dealing with some large amounts of data, and is quite slow. In this forum and in the sample code I see references to ways to optimize the draw speed of the GridGroupingControl. For example, in the "RealtimeUpdates" sample there is a routine called OptimizeGrid (see below) to improve drawing speed.
Now I can only assume that there is a tradeoff in grid functionality to use this optimization, otherwise this would be included in the grid by default. What are these trade offs? What do we give up by using this optimization for speed? Are the other optimizations we can use?
Here is the code from RealtimeUpdates\form1.cs:
void OptimizeGrid(GridGroupingControl gridGroupingControl)
{
// Couple settings to perform better:
gridGroupingControl.InvalidateAllWhenListChanged = false;
gridGroupingControl.Engine.CounterLogic = EngineCounters.FilteredRecords;
gridGroupingControl.Engine.AllowedOptimizations = EngineOptimizations.All;
gridGroupingControl.TableOptions.VerticalPixelScroll = false;
gridGroupingControl.Engine.TableOptions.ColumnsMaxLengthStrategy = GridColumnsMaxLengthStrategy.FirstNRecords;
gridGroupingControl.Engine.TableOptions.ColumnsMaxLengthFirstNRecords = 100;
gridGroupingControl.Engine.TableDescriptor.PrimaryKeyColumns.Clear();
gridGroupingControl.SourceListListChanged += new TableListChangedEventHandler(gridGroupingControl_SourceListListChanged);
gridGroupingControl.SourceListListChangedCompleted += new TableListChangedEventHandler(gridGroupingControl_SourceListListChangedCompleted);
// faster navigation of current record - repaint only old and new record, not records in between
gridGroupingControl.TableOptions.ListBoxSelectionMode = SelectionMode.One;
gridGroupingControl.TableControl.IgnoreCurrentCellInvalidate = true;
gridGroupingControl.CurrentRecordContextChange += new CurrentRecordContextChangeEventHandler(gridGroupingControl_CurrentRecordContextChange);
gridGroupingControl.Table.CurrentRecord = gridGroupingControl.Table.Records[0];
}
Now I can only assume that there is a tradeoff in grid functionality to use this optimization, otherwise this would be included in the grid by default. What are these trade offs? What do we give up by using this optimization for speed? Are the other optimizations we can use?
Here is the code from RealtimeUpdates\form1.cs:
void OptimizeGrid(GridGroupingControl gridGroupingControl)
{
// Couple settings to perform better:
gridGroupingControl.InvalidateAllWhenListChanged = false;
gridGroupingControl.Engine.CounterLogic = EngineCounters.FilteredRecords;
gridGroupingControl.Engine.AllowedOptimizations = EngineOptimizations.All;
gridGroupingControl.TableOptions.VerticalPixelScroll = false;
gridGroupingControl.Engine.TableOptions.ColumnsMaxLengthStrategy = GridColumnsMaxLengthStrategy.FirstNRecords;
gridGroupingControl.Engine.TableOptions.ColumnsMaxLengthFirstNRecords = 100;
gridGroupingControl.Engine.TableDescriptor.PrimaryKeyColumns.Clear();
gridGroupingControl.SourceListListChanged += new TableListChangedEventHandler(gridGroupingControl_SourceListListChanged);
gridGroupingControl.SourceListListChangedCompleted += new TableListChangedEventHandler(gridGroupingControl_SourceListListChangedCompleted);
// faster navigation of current record - repaint only old and new record, not records in between
gridGroupingControl.TableOptions.ListBoxSelectionMode = SelectionMode.One;
gridGroupingControl.TableControl.IgnoreCurrentCellInvalidate = true;
gridGroupingControl.CurrentRecordContextChange += new CurrentRecordContextChangeEventHandler(gridGroupingControl_CurrentRecordContextChange);
gridGroupingControl.Table.CurrentRecord = gridGroupingControl.Table.Records[0];
}
SIGN IN To post a reply.
2 Replies
AD
Administrator
Syncfusion Team
July 25, 2006 12:26 PM UTC
Hi Jim,
I have contacted the development team regarding this issue and will be updating you soon.
Thanks for your patience.
Best Regards,
Haneef
I have contacted the development team regarding this issue and will be updating you soon.
Thanks for your patience.
Best Regards,
Haneef
AD
Administrator
Syncfusion Team
July 26, 2006 10:41 AM UTC
Hi Jim,
Allowing certain optimizations does not mean that the optimzation is necessarily used. Optimizations will only be used when applicable. That’s the reason these optimizations were not included in the grid by default.
Refer the below links for more details.
EngineOptimization: http://www2.syncfusion.com/library/default.aspx?url=classref/syncfusion.grouping.engineoptimizations.html
EngineCounterEnumeration: http://www2.syncfusion.com/library/default.aspx?url=classref/syncfusion.grouping.enginecounters.html
GridColumnMaxlengthStrategy Enumeration: http://www2.syncfusion.com/library/default.aspx?url=classref/syncfusion.windows.forms.grid.grouping.gridcolumnsmaxlengthstrategy.html
Regards,
Haneef
Allowing certain optimizations does not mean that the optimzation is necessarily used. Optimizations will only be used when applicable. That’s the reason these optimizations were not included in the grid by default.
Refer the below links for more details.
EngineOptimization: http://www2.syncfusion.com/library/default.aspx?url=classref/syncfusion.grouping.engineoptimizations.html
EngineCounterEnumeration: http://www2.syncfusion.com/library/default.aspx?url=classref/syncfusion.grouping.enginecounters.html
GridColumnMaxlengthStrategy Enumeration: http://www2.syncfusion.com/library/default.aspx?url=classref/syncfusion.windows.forms.grid.grouping.gridcolumnsmaxlengthstrategy.html
Regards,
Haneef
SIGN IN To post a reply.
- 2 Replies
- 2 Participants
-
JM Jim McKeeth
- Jul 24, 2006 06:11 PM UTC
- Jul 26, 2006 10:41 AM UTC