Performance Issue

I today purchased ANTS 3.1 Standard Edition. I used it to profile the application that I am currently working on and got a bit of a surprise. The load sequence of my app is covered by a splash screen and normally takes around 10 seconds. With ANTS profiling it this extended to between 350 and 400 seconds. Now I don't have a very powerful machine but that does not seem right at all - makes ANTS practically useless. Once the app started then the profiler did not seem to have much effect and the app was responsive.

Any suggestions please?
Jon Masterson

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi Jon,

    I'm curious to know what your code is doing while the spash screen displays -- usually you bind a bunch of assemblies or read configuration from a file, or in extreme circumstances maybe compile some dynamic code. ANTS Profiler is going to add varying degrees of overhead depending on what the code actually does.

    What would be useful for you in any case if you are performance profiling would be to use the 'disable profiler' button to temporarily disable code instrumentation during the splash screen and enable the profiler again when it's done loading.

    I hope that this helps.
  • Hi Brian

    Thanks for the reply. It is actually one of the methods that are called during the load that I want to optimize.


    There are half a dozen things that happen during start up - loading settings, loading a couple of large data files and finally setting up a graphical display (it is a CAD type program) Each element takes longer than it should

    I guess I need to turn off the splash-screen to see if that helps
    Jon Masterson
  • scruffyduckscruffyduck Posts: 8
    edited October 9, 2007 4:10AM
    OK this is proving frustrating. I have taken out the code that refers to the splash screen so that the app is just running it's load routines. It makes no difference to the time variation. It is not doing anything special so why should the presence of ANTS wreck the load times. I have just tested without ANTS and gotten a load time of 14 seconds. Right now with ANTS I am on 500 seconds and counting.....
    Jon Masterson
  • Well I have the problem all over any time there is disk activity. All disk access be it loading or saving is very very slow when ANTS is present

    27 seconds to serialize a file that takes a second or so without ANTS
    Jon Masterson
  • On the good news side - it gives me time to make a cup of coffee :) and I have managed to halve the load time for the item I was trying to improve :D
    Jon Masterson
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi Jon,

    Thanks for sharing your experience. ANTS Profiler is going to introduce some overhead -- my experience with serialization is that the .NET Framework compiles some dynamic code into temporary assemblies and runs thousands of methods. Normally this is pretty quick, but instrumenting all of this and collecting data about it is going to really slow it down. Not to mention that compiling in debug mode, and in ANTS Profiler detailed mode, disabling JIT optimizations seems to have a nasty cumulative effect.

    But I'm glad that it's got you looking at the problem bits of code anyway!
  • Thanks Brian

    I tried ANTS last year as a demo and did not recall the overhead so was surprised this time. Also my system is creaking which does not help. At least now I know what to expect I can plan accordingly :D
    Jon Masterson
  • Something you might want to try, if you haven't already, is setting a filter on which methods you're profiling. If you limit yourself to only methods in the namespace(s) you're interested in, then hopefully it should mean less overhead.

    Hope that helps,
    Robert
    Robert Chipperfield
    Red Gate
  • Robert wrote:
    Something you might want to try, if you haven't already, is setting a filter on which methods you're profiling. If you limit yourself to only methods in the namespace(s) you're interested in, then hopefully it should mean less overhead.

    Hope that helps,
    Robert

    Thanks Robert I will give that a try also
    Jon Masterson
Sign In or Register to comment.