Java Language Java Performance Tuning General approach


The internet is packed with tips for performance improvement of Java programs. Perhaps the number one tip is awareness. That means:

  • Identify possible performance problems and bottlenecks.
  • Use analyzing and testing tools.
  • Know good practices and bad practices.

The first point should be done during the design stage if speaking about a new system or module. If speaking about legacy code, analyzing and testing tools come into the picture. The most basic tool for analyzing your JVM performance is JVisualVM, which is included in the JDK.

The third point is mostly about experience and extensive research, and of course raw tips that will show up on this page and others, like this.