2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
Performance of GridGroupingControlThe performance of GridGroupingControl can be improved by making use of the below optimization encryptions in the sample application. C# // Optimizing the grid for better performance void OptimizeGridSettings(GridGroupingControl gridGroupingControl1) { gridGroupingControl1.CounterLogic = EngineCounters.YAmount; gridGroupingControl1.AllowedOptimizations = EngineOptimizations.DisableCounters | EngineOptimizations.RecordsAsDisplayElements; // GDI interop drawing, FirstNRecords Summaries. gridGroupingControl1.UseDefaultsForFasterDrawing = true; // Only paint modified cells. gridGroupingControl1.InvalidateAllWhenListChanged = false; gridGroupingControl1.InsertRemoveBehavior = GridListChangedInsertRemoveBehavior.InvalidateAll; }
VB ' Optimizing the grid for better performance Private Sub OptimizeGridSettings(GridGroupingControl As gridGroupingControl1) gridGroupingControl1.CounterLogic = EngineCounters.YAmount gridGroupingControl1.AllowedOptimizations = EngineOptimizations.DisableCounters | EngineOptimizations.RecordsAsDisplayElements ' GDI interop drawing, FirstNRecords Summaries. gridGroupingControl1.UseDefaultsForFasterDrawing = True ' Only paint modified cells. gridGroupingControl1.InvalidateAllWhenListChanged = False gridGroupingControl1.InsertRemoveBehavior = GridListChangedInsertRemoveBehavior.InvalidateAll End Sub
Optimizing memory performanceAllowedOptimizations - Specifies the optimizations, the engine is allowed to use when applicable. These optimizations can be used in combination with EngineCounter setting. EngineOptimizations enum defines values for this property. CounterLogic - It specifies the CounterLogic to be used within the engine. GroupingEngine maintains counters for VisibleColumns, FilteredRecords, YAmount, HiddenRecords, and the like. These counters occupy a countable portion of the grid tree in memory. On every list change, all these counters need to be refreshed along with the data records. UseDefaultsForFasterDrawing - By setting this to true, you can quickly switch to faster GDI Draw Text, Solid Borders and more efficient calculation of the optimal width of a column. Initializes recommended settings to improve handling of ListChanged events and scrolling through grid. Affected settings are: TableOptions.ColumnsMaxLengthStrategy, TableOptions.GridLineBorder, TableOptions.DrawTextWithGdiInterop, TableOptions.VerticalPixelScroll, Appearance.AnyRecordFieldCell.WrapText and Appearance.AnyRecordFieldCell.Trimming. InvalidateAllWhenListChanged - It lets you specify whether the grid should simply call Invalidate when a ListChanged event is handled or if it should determine the area that is affected by the change and call InvalidateRange. At first, you might think its better to determine the area that is affected by a change and call InvalidateRange. But when calling InvalidateRange, the grid needs to know the exact position of the record in the table before it can mark that area dirty. In order to determine the record position (and y-position of the row in the display), counters need to be evaluated. This operation can cost more time than simply calling Invalidate in high-frequency update scenarios. The group caption bar also needs to be updated when a record changes. InsertRemoveBehavior, SortPositionChangedBehavior properties and UpdateDisplayFrequency can speed up things when InvalidateAllWhenListChanged is set to false.
Reference link: https://help.syncfusion.com/windowsforms/classic/gridgroupingcontrol/performance |
2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.