Options

Application runs slower in profiler?

tyiptyip Posts: 3
I have an application that runs much slower in the profiler. The application runs with no problems outside the profiler. Speed degradation is of a factor of 10x to 100x slower. Is there something I can do about this? In general, is this a performance issue with the profiler? Are there certain function calls that slow down the profiler?

Thanks,
Tom

Comments

  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello Tom,

    There isn't a method call or a setting you can avoid to speed the Profiler up any. Simply enabling the profiling interface in .NET slows code down between 2 and 4 times (depending) and even more sometimes because JIT optimizations like inlining are disabled.
  • Options
    Thanks for the explanation. I have a couple of follow-up questions.

    - Is this magnitude of overhead typical in profilers?

    - How does ANTS Profile compare to other products on the market in performance?

    - How does the overhead affect the accuracy of profiler measurements?

    Tom
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello,

    Yes -- Microsoft exposes a profiling API and that causes the major performance hit. All profilers I know of use this, so I wouldn't expect any better.

    Other profilers can offer better/worse/or the same performance. They do different processing. I've heard, for instance, one of them walks the stack constantly looking for recursive method calls. It's dead slow compared to ANTS. Other ones sacrifice various levels of accuracy to get better performance, but in my opinion, we've got the balance just about right.

    ANTS Profiler has a method of compensating for its' own overhead. This is necessary for the reasons you've cited.

    Thanks![/quote]
  • Options
    Brian,

    I could live with a 2 to 4 times speed degragation but I am seeing orders of magnitude worse. I have an application that takes about 70 seconds to run in the VS 2005 environment. Yesterday I was profiling memory and gave up on it after an 1.5+ hours. Something must be wrong with either my application or the profiler.

    Thanks

    Brian
    Hello Tom,

    There isn't a method call or a setting you can avoid to speed the Profiler up any. Simply enabling the profiling interface in .NET slows code down between 2 and 4 times (depending) and even more sometimes because JIT optimizations like inlining are disabled.
Sign In or Register to comment.