We encounter massive performance issues while persisting and restoring the XamGrid with large data. We want to specifiy the persisted properties, because on the one hand the stored byte-array is too large and on the other hand it might improve the performance of the restoring-process. At the moment this are our PersistenceSettings:
_settings = new PersistenceSettings { SavePersistenceOptions = PersistenceOption.OnlySpecified, LoadPersistenceOptions = PersistenceOption.OnlySpecified }; _settings.PropertySettings.Add(new PropertyNamePersistenceInfo { PropertyName = "Columns", Options = PropertyNamePersistenceOptions.PropertyName }); _settings.PropertySettings.Add(new PropertyNamePersistenceInfo { PropertyName = "GroupByColumns", Options = PropertyNamePersistenceOptions.PropertyName }); _settings.PropertySettings.Add(new PropertyNamePersistenceInfo { PropertyName = "SortedColumns", Options = PropertyNamePersistenceOptions.PropertyName });
In general we want to store the FilterRow, GroupedBy, ColumnPosition, ColumnWidth, HiddenColumns, SortedColumns. My question is for example: Do I really have to store the whole property "GroupByColumns" to know which columns where grouped? Same for the other properties.
I've attached a solution where you can reproduce the issue. Just play arround with Save and Load....
Hello,
I am just checking if you have any other questions regarding the persistence settings.
Hi,
The saved by the Persistence Manager data could be reduced by following a couple of approaches. One of them is to store only the properties you need not all the settings in the grid by setting the persistence options to save only specific properties - OnlySpecified. Another thing could be to compress the MemoryStream that where the data is stored. This could be done using the DeflateStream class: http://msdn.microsoft.com/en-us/library/system.io.compression.deflatestream.aspx. I would also suggest you to have a look at the following post where similar issue was discussed: http://ko.infragistics.com/community/forums/t/48464.aspx.I hope this information will be helpful for you.
Ok. Any suggestions for the size problem of the stored configuration?
Hi Karl,
Thank you for your reply. I have been further investigating your issue and it occurs because of the large amount of rows in the XamGrid control(190000). The group by operation requires some time for its performance because in your scenario when grouping by the ‘Text1’ column, new 190000 GroupByRows are generated. I believe that this is expected behavior.
Let me know, if you need any further assistance on this matter.
All restoring procedures are slow: eg. Grouping by Text1 than by TrueFalse. Restoring needs a long time.
Did you notice the size of the configs (Byte-Array)? Between 20 and 30Mb each.