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. Image for the cookie policy date
close icon

Reduce memory consumption

Hi,

I have a GGC in my application displaying a table and a nested table with each around 15 columns. When loading a bunch of data into the grid (dataset with 25000 rows in the parent table and 3 child rows for each parent) my application grows to 800MB size. With 60000 I already get an out of memory exception but I would need to deal with at least 100000. I use filters, grouping and sorting on that grid.

I see that there are many many options all over the grid control and tables and engine. What are the best settings to reduce memory consumption? Are there any caches that can be turned off? Or any other things?

Another question: Are there any builtin options with ggc allowing to support multiple processors, e.g. turn on multithreaded operations or so?

Regards,
Christian


3 Replies

NR Nirmal Raja Syncfusion Team December 6, 2010 01:29 PM UTC

Hi Christian,

Please try using below optimization settings to increase the performance in GridGroupingControl.

girdGroupingControl.InvalidateAllWhenListChanged = false;
girdGroupingControl.AllowedOptimizations = EngineOptimizations.All;
girdGroupingControl.CounterLogic = EngineCounters.YAmount;
girdGroupingControl.UseDefaultsForFasterDrawing = true; // GDI interop drawing, FirstNRecords Summaries used to increse painting performance
girdGroupingControl.TableOptions.ColumnsMaxLengthStrategy = GridColumnsMaxLengthStrategy.FirstNRecords;
girdGroupingControl.TableOptions.ColumnsMaxLengthFirstNRecords = 100;


Refer the sample from our browser sample shipped along with below location. it demonstrates performance behavior in GridGroupingControl.
Grid Grouping Samples -> Engine Optimization Demo
Grid Grouping Samples -> Grouping Performance Demo


Here are some suggestions for memory foot print:
The performance of loading the data’s in the GridGroupingControl can be improved by making the child table of the Grid to load on demand. This will avoid the performance delay by loading the data’s of the child only when it is expanded or needed.
A property called UseLazyUniformChildListRelation has to be set to true to make the child table load on demand.

gridGroupingControl1.UseLazyUniformChildListRelation = true;

The memory footprint issue can be solved by avoiding all the values to be cache. This can be done by making the CacheRecordValues to false.

gridGroupingControl1.Engine.CacheRecordValues = false;

If you have large data sources and need support for groups and filtered records you can reduce the memory footprint by disabling counters where you do not need in your application.

gridGroupingControl1.Engine.CounterLogic = EngineCounters.YAmount;

The auto sizing calculation for the column can be reduced to some rows so that the performance of the calculation can be increased.
This has to be done by providing the FirstNRecords to the ColumnsMaxLengthStrategy, and specifying the number of record in ColumnMaxLengthFirstNRecords.

gridGroupingControl.TableOptions.ColumnsMaxLengthStrategy = GridColumnsMaxLengthStrategy.FirstNRecords;
gridGroupingControl.TableOptions.ColumnsMaxLengthFirstNRecords = 50;//the number of records you want checked.

Please let me know if you have any queries.

Regards,
Nirmal



CR Christian Rattat December 7, 2010 08:42 PM UTC

Hi Nirmal,

thanks a lot for your help, that made it much faster and reduced the memory consumption so that it fits my needs now.

Best regards,
Christian



NR Nirmal Raja Syncfusion Team December 8, 2010 04:17 AM UTC

Hi Christian,

Thank you for the update.

We are glad to hear that the issue has been resolved on your end.

Regards,
Nirmal


Loader.
Live Chat Icon For mobile
Up arrow icon