This topic explains precautions to take when profiling a function that calls other functions (child functions).
Let’s call the caller function
ParentFunction. If --
you are not using All Project Modules or Entire .NET Code (if you are profiling a managed application),
ParentFunction is included in a checked profiling area,
but some or all of the child functions it calls are included in no checked area,
then this will happen:
The child functions will not be profiled, and therefore will not appear in the Details panel for
ParentFunction. Their results (for instance, the execution time), will still be counted, but as part of
ParentFunction’s results (for example, the execution time of the
ParentFunction’s own code). AQTime is correctly noting
ParentFunction’s entry and exit times, but “knows” nothing about the time spent “outside” on calls to unprofiled child functions. This is can easily lead you to assume the slow code is in
ParentFunction, when actually it is in some unprofiled child function.
So, when you are worried about a function’s execution time (or other results), make sure that its children are profiled along with it. You may identify the child calls by looking up the parent function in the Editor panel. This is also a good occasion to think of triggers.