Saturday, 25 October 2008

Memory Usage

The Sandstorm client app is currently using about 83mb of RAM at runtime. It also consumes up to 25% of CPU time when idle. When the app is minimised the CPU usage drops to 0%. The CPU usage is regardless of whether Sandstorm is being run from within the VS2008 IDE.

I ran a little test app and its RAM footprint topped out at 39mb when run inside the VS2008 IDE. Running as a standalone exe it used a more "modest" 23mb. Interestingly it used no CPU time when idle.

Finding memory leaks in WPF based applications

Avoiding WPF Memory leak with Databinding

A memory leak may occur when you use data binding in Windows Presentation Foundation

Martin and I concluded that we need to implement INotifyPropertyChanged on any class that will be involved in Databinding. The most likely route will be to derive all the relevant classes from a base class that implements INPC.

This tool has a "visual profiler" which shows a graph of CPU usage.

WPF Performance Tool

No comments: