Profiler Results
What does it all mean?
──────────────────────────────────────────────────────────────────────────────

Once you have finished running each and every one of your functions,
procedures, routines, cleaned the kitchen sink and put the cat out you can
take a look at the results.

The output contained within the profiler window shows you all of the
functions, or procedures that have been called from your program. By default
they are displayed within the order that they were called, with the first
function called at the top of the window, and the last function at the
bottom of the list.

The times recorded in the profiler window, do not include the time taken to
make calls to MrDebug or any parts of the profiler. So this should at least
give you an rough approximation of how long your functions will take to call
without MrDebug linked.

The columns within the display show you the following for each
function/procedure:

The .PRG name, where the function came from.
The name of the function.
The number of calls made to the each function.
The Total Time spent in the function during the program run.
The Average Time spent in the function.
The Quickest Time spent in the function.
The Slowest Time spent in the function.

When you first see the profiler window, you will notice that there is no
sort order for the information held within the window. When there is no
sort order, items are added to the top of the list so you can see the most
recently added items straight away. You may set a sort order from the
Profile Sort Order submenu.

Available orders are:

Filename & function name. (Alphabetical)
Function name. (Alphabetical)
Total calls to function. (Most at top)
Total duration of calls to function. (Most at top)
Avarage duration of calls to function. (Most at top)
Quickest call to function. (Least at top)
Slowest call to function. (Most at top)

It is up to you to decide which order works best for you, and you may well
discover that it takes a few different views of the data to decide what
needs your attention. For example, you could set the Sort Order to be
Calls. This would sort the profile window by the number of calls made to
each function.

This would be handy as you would be able to see the most called functions
and acting on this information, you would be able to move some of these
functions out of the overlay modules and into the root module of the program
- thus speeding up the program as it would not have to make so many calls
to the external overlay.

But, be warned, you do not want to add everything to the root module as this
will increase the size of the load module and reduce the amount of memory
made available to your application - thus slowing down the program and
defeating the object of this exercise.

The profiler is often handy to spot functions which are getting called way
too many times because of a program error, and not because of program
behavior. Once you have spotted that offending piece of code, you can
inspect it straight away by pressing the <Enter> key which will select the
Source Code Window and position you on the first executable line of code for
that function. Or in the case of a Code-Block, it will place you on the
line that it was defined. The <Space> bar will also position the Source
Code Window in the same manner but will leave you in the Profiler Window.

PS. Don't be alarmed when you see you tBrowse code-block Call count to be in
the 1000's just for a single screen stabilization.