3

When starting the application, the application consumes slowly more and more memory. I am trying to figure out why this is happening and haven't been very successful yet.

Our WPF client gets the data pushed in from the server. The backend is in C++ and the data gets pushed into our C# model and wired down through the ViewModels up to the DataGrid.

After a while of inactivity though, I can see that the heap memory and the Large Heap Size keep increasing for no reason. Well the data is pushed in, so maybe this is the reason but after 2 hours and 15 min the unnecessarily increased memory is freed up again, just to go slowly up again.

On the right side of the graph (after over 24 hours), I have loaded even more tabs and more data, hence the massive increase but from then on there is no freeing up of memory anymore.

The Graph is showing that System.Windows.EffectiveValueEntry[] is taking the most memory. From my understanding this class is related to the WPF dependency objects. But I have no idea what could be causing this. I am not expecting the memory to go down, as I am not closing anything. But why is it going up like this?

What could be the cause?

enter image description here

Many Thanks,

Houman
  • 64,245
  • 87
  • 278
  • 460
  • 1
    Classic sawtooth pattern from the garbage collector. I'd have to guess it goes up because you added a lot of rows to the grid. You can't expect anybody to diagnose this without knowing what the program does. – Hans Passant Sep 30 '11 at 16:58
  • Pity you didn't get a snapshot before the blue line when you had a big rise and then measure against the red capture. Currently the app looks well behaved (sawtooth) except for that big rise and then back to the sawtooth pattern. Do you know what action caused that? – Shaun Wilde Oct 02 '11 at 08:30
  • Thanks Hans and Shaun for your response. @Shaun, I have clicked on more tabs to simply load more data. Hence the increase in memory. Once the data is loaded in the new tabs, it never gets released (on purpose) hence the increase in memory. Thinking about it, you are right the sawtooth pattern makes perfectly sense in managed memory environment. Thanks for your help guys. If you put this as an answer, I can mark it as answered already. – Houman Oct 03 '11 at 09:23

0 Answers0