Tuning Java Performance? Think Japex
Unit testing has spawned a new type of development, test driven development. In TDD, test coverage leads the way in development, and it's a great way to develop new functionality.Unfortunately performance tuning hasn't kept up with unit testing in terms of tools support and ubiquity. Usually when Java developers do performance tuning, it seems the strategy is generally ad-hoc and untargetted. I am certainly guilty of using this approach, and the code I've written suffers as a consequence. My ad-hoc approach is lame:
System.currentTimeMillis()
calls throughoutBut there hasn't really been alternatives to this ad-hoc approach. Although tools like Netbeans Profiler and JProbe can analyze the performance of a single component, they're not good at comparing different implementations of the same component because they only work with one implementation at a time.
Enter Japex. This fantastic tool is to performance testing what JUnit is to unit testing. Here's my new strategy, which is a much more efficient:
My code-compile-test cycle is now much faster. I'm able to try more things so I get a better understanding of the performance impact of each change. Just like how unit tests give me confidence to refactor, Japex gives me confidence to performance tune. Be sure to check it out, it's a worthy tool for your Java developer toolbox.