Hi,
After upgrade from 12.1 to 13.1 i do have problems with outofmemory exception on my grids. I do have 15.000 records (wide table) - memory is over 1GB
On old version application memory was around 200-300MB.
Can i take a look on something to get it checked?
Best
Hello Wojciech,
My team and I have done an initial investigation into this issue you are seeing, but without some more details on this, we cannot really be sure why exactly an OutOfMemoryException is occurring in your XamDataGrid between the versions of 12.1 and 13.1. Would it be possible for you to please provide some information on the following?
1. What is the specific version of 13.1 that you updated to? This number should look like 13.1.20131.XXXX and can be found in the Properties Window in Visual Studio when selecting one of the referenced Infragistics assemblies.
2. When does the Out Of Memory exception occur? (i.e. when scrolling the grid, filtering, on startup, etc.)
3. What is the containing element for your XamDataGrid? By any chance, is it placed within a StackPanel or ScrollViewer?
4. Are you setting any of the "generation mode" properties on the XamDataGrid. These properties are ones like CellGenerationMode and RecordGenerationMode. If you are setting them, what are you setting them to?
Other than the above, I would recommend running your application through a memory profiling application such as the built-in Visual Studio memory and performance profilers or a third-party one like ANTS (https://www.red-gate.com/products/dotnet-development/ants-memory-profiler/index). These tools may help you to further determine the reason for the Out of Memory Exception in your XamDataGrid.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate Developer
1. 13.1.20131.1009
2. It is on startup
3. It is in xctk:Wizard->xctk:WizardPage, but some of the probles are on StackPanel
4. Theres a property RecordContainerGenerationMode = "PreLoad"
I will try to run an app that you suggested, but i'd like to know if some of my answers give you a hint wheres a problema
I did run ANTS to check what object takes most of the memory it is shown to be EffectiveValueEntry[] next is WeakReference , both objects are in windowsbase. And i as far as i did manage to read the internet i've found that it should be eliminated by higher version of framework. I've upgraded 4.0 framework to 4.6.1 but still it is the same.
Funny thing is that on older version 12.1 and framework 4.0 it worked just fine. On 13.1 and 4.0 or 4.6.1 it is not. Did you have any suggestions?
After running it with resharper dotmemory - most memory are consumed on DataRecordPresenter (Infragistics.Windows.DataPresenter) and RecordListItemContainer (Infragistics.Windows.DataPresenter.Internal) then are the objects of my development. This is global problem for the application and after changing the library i do have globaly a performance issue. I've also tried framework 4.5.2.
I find it rather strange that everything was working well for you in 12.1 if you have your RecordContainerGenerationMode set to "PreLoad." This setting will essentially disable the record-container virtualization in the XamDataGrid and load every record container for your 15,000 records on startup. These elements are the DataRecordPresenter, which is very likely why you are seeing the memory consumed there. Since your XamDataGrid has 15,000 records, with this setting, all 15,000 containers will need to be loaded at the start. This is likely what is leading to the behavior you are seeing, and I would expect that your grid is also taking forever to show up.
By default, the XamDataGrid will only load the record container for the records that are immediately in view, and then it will recycle these containers as you scroll as the others will be virtualized. If you are using thousands of records in the XamDataGrid, I would highly recommend against changing the RecordContainerGenerationMode property, as if you are looking for high performance, you will not get it using this setting.
You have also mentioned a StackPanel in this case. If your XamDataGrid is inside of a vertically-oriented StackPanel, I would recommend against this as well, as StackPanels measure with an infinite height, and this will disable the virtualization of the grid as well.