Optimization and Performance Profiling
To squeeze every second of a given program for mission critical optimizations, it may be necessary to craft a repeatable unit test and profile the results using a profiling tool such as YourKit (www.yourkit.com). This section will include some code samples to log execution times. Attaching a profiler could give clues to optimization points. A common pattern to follow in testing code is to allow the System to "warm up," for example to load up the necessary application caches which are only done once and are not relevant to the code being optimized.