Book Review – Java Performance: The Definitive Guide

Book Review - Java Performance: The Definitive Guide

Author by Suhanya Jesudason, Tata Consultancy Services

It was on a weekend I went to meet my aunt in Chennai.  She was happy to see me after a long time and her daughter (my cousin) who was enjoying the salary hike on completion of two years of her service with a leading IT company, came to me running to give a hug.  In a minute or two, she brought me a cup of coffee.  After a sip, I exclaimed “Hey, it’s so tasty, so sweet.”  She giggled and said “Thanks to the coffee maker we bought recently.  It makes our work easy –  just two minutes.”  Our conversation revolved around so many topics from politics to pastries and finally landed in career path.  When I asked her to be proud about being a java developer, “Nothing interesting” is what she said.  In order to motivate her to work with interest, I asked her how it felt when I sipped the coffee and said so tasty and so sweet.  She said she was happy though the complete credit goes to the coffee maker.  I took this chance to explain to her how she can take the credit when an end user say ‘so quick, so smooth’ on using her application.

I continued, the magic happens if you ensure performance.  Imagine your application as a coffee maker and when you develop it or create it, you make sure that coffee is brewed when the appropriate buttons are pressed.  This explains the functionality part.  A developer’s work does not stop with developing code to work for what it is coded.  Code works is news.  Code performs well will be good news.  Like how the right quantity of water or coffee beans is placed, right amount of heap or CPU should be ensured.  The dust formed within the coffee maker should be cleaned on a regular basis to serve a hygienic cup of coffee, which is equivalent to choosing the right garbage collector algorithm to clean the application of unnecessary or unreferenced objects.  The time within which the coffee is brewed can be compared to the end user response time.  She was listening with interest but I realized it was already late and I need to leave.  In order to keep the momentum going, I gave her the book ‘Java Performance: The Definitive Guide by Scott Oaks to know more about how to create a better coffee maker, sorry Java application.

Java Performance: The Definitive Guide is the eighth book by Scott Oaks for O’Reilly.  This book starts with an approach to performance testing, test result interpretation, benchmarks to consider and how important it is to have performance testing as an integral part of the development cycle.  Performance analysis is explained with the tools/commands to be used and the key points to note in the output.  The author highlights that profiling tool is the most important tool in a performance analyst toolbox.  He has described the Just In Time Compiler tuning in very simple terms, followed by a detailed note on Garbage Collection and its algorithms – Scott considers GC as mixed Blessing.  We are then explained with various best practices to be followed while considering the Heap memory and native memory.  In-depth look at threading and synchronization, web container performance, EJB pools, XML and JSON processing, networking APIs and performance best practices for Java driven database applications would make you really feel this is ‘The Definitive Guide’ any Java performance engineer should read and gain.

Java Performance: The Definitive Guide – As the author himself has stated ‘This is a book about the art and science of Java performance’

A must read for all Java developers and performance engineers!