Home Forums WPF controls Xceed DataGrid for WPF Excessive memory usage after repeated grid loads

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #25320 |

    Over the weekend I left my application doing a stess test. The single grid has 19 columns and the data content varies every 10 seconds from 0 rows to 9 rows. The purpose being to ensure that all objects are released and GC as in normal usage the application would see this style of usage.

    After 17 hours or so I paused the application and used WinDbg to look at the heap as the memory footprint had grown from a starting point of 90Mb to over 1Gb.

    The Xceed objects and row/cell objects looked correct in terms of their size and number (allowing for GC generations). However, there were a very lareg number of System.Windows.ChildValueLookup[] objects (28,000 of them) which took up 950Mb of the heap (as a comparison, on startup there are 1,500 of them using 60Kb)

    When doing the test without the Xceed grid I don’t get this growth.

    I cannot find any web reference as to what this object is, and hence cannot work out where it comes from. Has anyone any useful ideas on this one? Obviously it is difficult to post the XAML/code used as it is now a production application.

    Imported from legacy forums. Posted by Derek (had 3369 views)

    User (Old forums)
    Member
    Post count: 23064

    I think that class is mainly used for keeping track of styles in your WPF program. Do you use a lot of custom style/trigger?

    Imported from legacy forums. Posted by nat (had 338 views)

    User (Old forums)
    Member
    Post count: 23064

    Not knowingly but I will try to create a simplified test app to see if I can keep on removing things to identify the cause.

    Imported from legacy forums. Posted by Derek (had 303 views)

    User (Old forums)
    Member
    Post count: 23064

    So I think I have found what is causing this. During the previous test I was totally destroying the Columns and Items Source of the Grid and then recreating them for each load.

    Changing that so that the Column structure is not changed (once initially created) and only changing the ItemsSource has changed the test so that the ChildValueLookup[] does not increase in size during the test.

    However, it would still be good to know what is causing this as I know I have some circumstances where I must remove the Column structure and create a new one.

    Imported from legacy forums. Posted by Derek (had 265 views)

    User (Old forums)
    Member
    Post count: 23064

    How did you remove columns and itemssource?

    Imported from legacy forums. Posted by nat (had 4415 views)

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.