"The profiling process helps you to determine which
subroutines or just snippets of code take the longest time to
execute and which subroutines are called most often. Probably you
will want to optimize those."
"When do you need to profile your code? You do that when you
suspect that some part of your code is called very often and may be
there is a need to optimize it to significantly improve the overall
performance."
"... A very important aspect of performance tuning is to make
sure that your applications don't use much memory; since if they
do, you cannot run many servers and therefore in most cases under a
heavy load the overall performance degrades."