Performance Tuning

  1. Number One rule of performance tuning:

    "The bottlenecks are never where you think they are". I can't emphasis this point enough.

  2. Always use a profiling tool when doing performance testing. I really like JProbe for java.

  3. Don't tune too early. You can spend valuable time tuning code that is going to be thrown away.
  4. If you are tuning properly, you should have repeatable, automated tests that can be used to define the improvement. You should also be able to predict and verify the speed changes. If you can't predict or verify your code changes, something is wrong.