The last weeks I have been busy monitoring and optimising a .NET WinForms client/server application in terms of performance and memory consumption . For a task like this a good profiler is indispensable. There are a variety of choices here. I have tried ANTS from Red-Gate, AqTime from AutomatedQA and JetBrains DotTrace.
AqTime for example is capable to show you nicely the role the Jitter and the Garbage Collector play during the lifetime of your application. In our case the GC continuously take some 4-6% from the execution time. Efficient memory usage within the application can reduce this factor.
I developed a timed caching/disposal mechanism for Workflow instances. Using DotTrace it was easy to proof the concept was really working and Workflow instances were unloaded and disposed successfully,
During a Memory allocation session with ANTS I focused on objects with a high memory footprint. The biggest object was a generic Dictionary with language translations. Just by refactoring this a bit I was able to reduce the footprint of the dictionary with approximate 70%.
Lesson: Take a profiler to look at your .NET application and you will learn about what happens behind the scenes in your app. It's indispensable if you want to do some structured performance and/or memory optimising