I just installed dot tracer to monitor a huge self-service kiosk manager app that I wrote and now am working on it's performance issues. The solution consists of nearly 40 different projects which are loaded (depending on the requirements of the customer) by the main assembly which is a WPF executable using reflection in run-time.
The performance is quite acceptable on a 3 GHz machine with 3 GBs of RAM and a graphic card (6% - 12% of CPU usage, 80 MBs of RAM and 20% - 40% of GPU usage) but 3 days ago I ran it on a very weak machine (0.6 GHz CPU, 1 GB of RAM and no Graphic card) of one of the clients and the CPU usage was above 60%, so it hit me to go find what was the bottleneck!
Anyway, dot tracer shows me that most of the time is spent on waiting (mostly Thread.Sleep
sections) because my app has different threads that wait in some loops for something (i.e. an incoming message on a socket, a key press on a device, etc.) to happen.
So, is it bad that my app is using Thread.Sleep()
? Do I have any other choices?
Here is the test result :