I just downloaded a trial version of ANTI Performance Profiler from Red Gate and studied some of my commands. Immediately, I notice that there is a specific section of code that ANTS reports that it consumes up to 99% of the processor time.
I am completely unfamiliar with ANTS or performance profiling in general (that is, other than self-profiling, using what I'm sure is extremely rude and frowned on such methods as double timeToComplete = (endTime - startTime).TotalSeconds), so I still play around the application and find out how it is used. But I called the developer responsible for the code in question, and his immediate reaction was “Yes, it doesn’t surprise me that it says, but this code calls SignalAndWait [which I could see myself, thanks to ANTS], which doesn’t use any processor, it just sits there, waiting for something. " He advised me to simply ignore this code and look for everything that I could find.
My question is: is it true that SignalAndWait does not require any processor overhead (and if so, how is this possible?), And is it reasonable for the performance profiler to consider it taking up 99% of the processor time? I find this especially curious, because if it is 99%, this suggests that our application is often idle, right? And yet its performance has recently become rather sluggish.
As I said, I really start when it comes to this tool, and I don't know anything about the WaitHandle class. Therefore, any information that will help me understand what is happening here will be appreciated.
source
share