views:

54

answers:

2

My next task is tune-up our C# application to minimise the memory usage, reduce threads used and improve performance.

There will be a small status message received by our application every 100ms. The application will process these status message. Then a 2M data will be received by our application. That day will be processed and 4 more data will be created based on the processed data. After that all data will be saved to the database.

The communication between modules is event. So there are about 100 events (not all are necessary) in the system.

Any tool I can use to diagnosise the issues and help make it better?

+2  A: 

The application you need is Profiler. There are many such tools for .NET. Visual Studio of the highest editions includes integrated profiler. Also you can download different .NET profiler tools from many places:

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=a362781c-3870-43be-8926-862b40aa0cd0

http://memprofiler.com/?gclid=CMTpo73j66ICFQ8EZgod6nuagA

http://www.jetbrains.com/profiler/

http://www.eqatec.com/Profiler/Home.aspx

STO
I am using VS2008 professional edition. no Profiler?
5YrsLaterDBA
A: 

This method works very well in C#. It finds out what you can fix to improve performance (for these reasons). If you are allocating too much memory, that will show up as a large fraction of time in new of the particular objects. Since you have multiple threads, you can apply the technique independently to the different threads.

You can expect to find, early on, some things that are fairly easy to fix to get speedup. After that, what you need to do will be obvious, but it may not be simple, and require some more extensive redesign.

Mike Dunlavey