We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid grouping control and performance

Thread ID:

Created:

Updated:

Platform:

Replies:

76493 Sep 9,2008 06:10 PM UTC Sep 11,2008 05:02 AM UTC Windows Forms 4
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On September 9, 2008 06:10 PM UTC

Hi,

I need your help. I use a grid grouping control because I need to sort, group element, filter etc. But I need a good grid performance(Refresh). I can have 1 000 000 rows and some rows can have children. I use a BindingList for each element in the grid.

this.gridGroupingControl1.Datasource = MyBindingList;

MyBindingList contains a list of object that have many properties.

MyObject.Name(string)
MyObject.Address(string)
etc..

If I use only one level of bindingList, it's ok.. (6 or 7 seconds for 100 000rows). But If I use a bindinglist property, it's very very slow.

Myobject.Name(String)
MyObject.Address(String)
MyObject.Contacts(BindingList) <--
etc..

It takes 2 minutes!!! I need to load the list in few seconds...

How can I increase the performance?

I enabled many optimizations:

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



Thank you,

Fred



Nisha Arockiya A [Syncfusion]
Replied On September 10, 2008 05:12 AM UTC

Hi Fred,

Thanks for your interest in Syncfusion products.

I would like to mention that if your performance problems are related to initialization time of the grouping engine and loading data from a datasource, there are also some standard optimizations that let you speed up the grouping engine.

Please use these settings also and check if they make a difference:

void OptimizeGrid(GridGroupingControl gridGroupingControl)
{
// Couple settings to perform better:
gridGroupingControl.Engine.CounterLogic = EngineCounters.FilteredRecords;
gridGroupingControl.Engine.AllowedOptimizations =
EngineOptimizations.DisableCounters
|EngineOptimizations.RecordsAsDisplayElements
|EngineOptimizations.VirtualMode
;
gridGroupingControl.TableOptions.VerticalPixelScroll = false;
gridGroupingControl.Engine.TableOptions.ColumnsMaxLengthStrategy = GridColumnsMaxLengthStrategy.FirstNRecords;
gridGroupingControl.Engine.TableOptions.ColumnsMaxLengthFirstNRecords = 100;
}

Based on the specific way you use the grouping grid more optimizations could be suggested, but I would need to more details about the application, the data and which features of the grouping engine you are using.

If you can provide us with a sample that gives an idea about the specific requirements of your application we will also be glad to debug and look at such a project and see how the grid can be optimized in more detail.

Also refer the browser samples for more details.
Performance:
\syncfusion\essentialstudio\3.3.0.0\Windows\Grid.Windows\samples\Grouping\GroupingPerf
Optimizations:
\syncfusion\essentialstudio\3.3.0.0\Windows\Grid.Windows\samples\Grouping\EngineOptimizations

Please refer this thread also.

http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=22448

Please let me know if this helps.

Best Regards,
Nisha

>Hi,

I need your help. I use a grid grouping control because I need to sort, group element, filter etc. But I need a good grid performance(Refresh). I can have 1 000 000 rows and some rows can have children. I use a BindingList for each element in the grid.

this.gridGroupingControl1.Datasource = MyBindingList;

MyBindingList contains a list of object that have many properties.

MyObject.Name(string)
MyObject.Address(string)
etc..

If I use only one level of bindingList, it's ok.. (6 or 7 seconds for 100 000rows). But If I use a bindinglist property, it's very very slow.

Myobject.Name(String)
MyObject.Address(String)
MyObject.Contacts(BindingList) <--
etc..

It takes 2 minutes!!! I need to load the list in few seconds...

How can I increase the performance?

I enabled many optimizations:

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



Thank you,

Fred





Administrator [Syncfusion]
Replied On September 10, 2008 12:07 PM UTC

Hi,

Thank you for your answer. I tried the optimization and I think that the virtual mode is very fast when the parent object does not have any child property. I can give you a small application that show you the problem. I take this example from your forum and I modified it.

In the class ParentObj.cs, you have to enable this property :

public BindingList Child
{
get { return childObj; }
}

If this property is activated, the grid is very slow(more than 1 minute to load 1 000 000 rows).

My requirement is :

1. Load 1 000 000 in few seconds(less than 5 seconds).
2. I can have more than 30 columns.
3. Some elements in the grid can be grouped.
4. Multisort enabled.
5. Filtering enabled.
6. Quick find
7. Hierarchical view like the example: RelationsAndHierarchical/SelfRelations

The grid must be very fast. I know that if the grouping and sorting is enabled, the virtual grid will be disabled but, how to load the grid very fast? My requirement is realist?

Thank,

Fred



BindingListAndGGC_7ebcc341.zip

Administrator [Syncfusion]
Replied On September 10, 2008 12:15 PM UTC

I forgot something in my requirement :

- the user can edit some field in the grid and i don't want to refresh all the grid, juste the visible area.

- I don't want any flicker...It must be very fluid.

Thank you,

Fred


Nisha Arockiya A [Syncfusion]
Replied On September 11, 2008 05:02 AM UTC

Hi Fred,

Grid will have issues handling 1 million records with nestedtables and enabling sorting, filtering.

To increase the loading speed, instead of using the conventional method you could use PassthroughGrouping as per sample:

Documents\Syncfusion\EssentialStudio\6.3.1.8\Windows\Grid.Grouping.Windows\Samples\2.0\FeaturedSamples\LINQGroupBy\
(CustomerOrder, CustomerOrderDetails)

This will not load the ChildTable initially. ChildTables are loaded as per query ondemand when the records are expanded.
By using PassThroughGrouping there is significant improvement in loading time (reduced from 25 sec to 6 sec for 100k records).

Please refer to the following sample code:

BindingListAndGGC

Please let me know if this helps.

Regards,
Nisha


>I forgot something in my requirement :

- the user can edit some field in the grid and i don't want to refresh all the grid, juste the visible area.

- I don't want any flicker...It must be very fluid.

Thank you,

Fred




CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;