Java Performance Tuning (2nd Edition)

Java Performance Tuning (2nd Edition)
Authors
Jack Shirazi
ISBN
0596003773
Published
01 Jan 2003
Purchase online
amazon.com

Java Peformance Tuning, 2nd edition provides a comprehensive and indispensable guide to eliminating all types of performance problems. Using many real-life examples to work through the tuning process in detail, JPT shows how tricks such as minimizing object creation and replacing strings with arrays can really pay off in improving your code's performance. Tuning J2EE applications bears many similarities to tuning J2SE apps, but important and specific considerations apply.

Page 2 of 2
  1. Editorial Reviews
  2. Customer Reviews

Customer Reviews

Brian Hughes said
Pretty good book on covering a majority of the performance issues for Java and how to code for performance.

J. Brutto said
The book covers a wide range of topics with some decent, but out-dated examples. As a collective whole, this writing will get you thinking. However, some suggestions provided are impractical and simply not effective enough to warrant implementation. Providing pros and cons in the majority of examples provides some jewels of information and things to think about, but it does not live up to the massive amount of difficult, wordy reading involved or the overly verbose samples.

I was able to take some things away from this book, but not nearly enough to warrant recommending it.

Sorry guys, it's a dud.

Peter Booth said
If you are a core Java developer/architect who does performance tuning on a regular basis this should be part of your library.

Over time, this has been the most useful of the dozen or so performance books I own. It's scope is narrow - core Java tuning and it skates over the distributed computing smells that seem to be the most common cause of hot spots in today's Java apps. The author isn't afraid to describe unorthodox or ugly tricks when they can bear fruit. The custom Class object that seemed to offend some reviewers helped me track down a gnarly memory issue in an app that was too bloated for OptimizeIt to be practical. Doing the "wrong thing" to get the "right result" can be the essence of pragmatism. The section on StringTokenizer implementation is a great example of unpicking a typical performance issue from inappropriate use of a general purpose class.

Performance tuning is a specialty that demands pragmatism, confidence, persistence, creativity and a high tolerance for ambiguity and uncertainty. I suspect that only a minority of the population of competent developers have the necessary assortment of personailty quirks to be effective performance engineers. Black and white thinking, sometimes a trait of smart developers, is a disaster for performance engineering.

Joel Aelwyn said
... or "You had a whole SECOND to reply? In MY day..."

First: if you are not a 'hardcore' Java programmer: do not bother with the rest of this review, and do not buy this book until you reach that point. It won't help enough to offset the damage it causes.

That said, a bit of context: the project I was working on that inspired me to buy a copy of this book involved a telecom system that had to handle hundreds of transactions a second, with sub-second response times (yes, in Java). Not the biggest system, or the fastest, but definitely not "fancy GUI code", by any stretch of the imagination.

Don't buy this book to learn how to use an optimizer; it isn't a beginner's guide. After buying it, I only ended up using perhaps two of the items covered in the book, while working on the project. But those two points were things that the several hundred collective years of development experience on the project had missed, and every other topic in the book warranted at least the question "did we check for this?"

It is difficult to categorize the audience of this book; it is in the odd position of needing to be far too heavy on theory and detailed explanation to be a "cookbook", for it to be of any use, but it also has to cover topics so diverse that it is unlikely that more than a handful will ever apply to any single situation, so it isn't really a "how to" book, either.

So why did I give this book four stars? Because a different set of points in the book applied on the next project I had to work on. But those 4 stars with a warning: for the audience and topics that it covers, this book it is *very* good, and for anything or anyone else, it will be, at best, nonsense; at worst, using it can be actively counterproductive (as another reviewer noted, several of the things the author covers are not for the faint of heart, and for very good reasonss).

It failed to earn five stars for two reasons: first, while the author has a clear grasp of his material, his grasp of the audience seems to be hazy at times. Like the marketing of the book itself, he seems to have trouble deciding whether his audience is experts looking for that one golden tweak, or novices (who, in this case, should look for a more introductory book on profiling and optimization in general, or the tools they have available, in specific).

The second reason is not a problem with the material itself, just the passage of time - this edition predates the release of the Tiger version (of Java, not Mac OS X), and thus does not cover it. However, anyone attempting to use this book to work with Tiger should, in my opinion, strongly reconsider doing so; while the fundamentals of how to do the analysis remain the same, the details of several of the issues the author discusses are *completely* changed in Tiger.

Manish Singla said
This book provides good ideas on tactical optimization for performance gain but could have also covered architectural patterns and process for performance optimization.
This book covers the areas of optimizing compilers, I/O, RAM footprint, small object management and deployment etc.

Next edition may also cover architectural decisions (or patterns) which are costly to reverse later. Also, coverage on processes for performance optimization will be great in next edition. Getting a program to run faster costs money, and thus this business decision should have process ( or guidelines for series of high level actions ) to facilitate the optimization.

Other things, I would like to cover in next edition are
1) How to choose between "speed up the slow things" or "do the slow things less often".
2) How to identify ACTUAL areas of improvement. i.e. Importance of automated run that reasonably simulates the program under its usual conditions. (Example, our test on performance gave excellent results. But European customers rejected the product because we had not simulated ocean hop of packets as 2 databases were in America. Or importance of using a multi-user simulation system to identify real problems i.e. transaction interactions etc).
3) Importance of cohesive, loosely coupled and well factored modules for behaviour-preserving transformations of performance.
4) Importance of measurement before starting optimization.

Anyway, great book.

You might also like...

Comments

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“My definition of an expert in any field is a person who knows enough about what's really going on to be scared.” - P. J. Plauger