Java Tuning

ClanBrandon Books
view more info on this item
click here for more details, find new or used items

Jack Shirazi

Our price £20.77 (£31.95)
New from £15.06
Used from £6.03

Pages: 600 (Paperback)

ISBN: 0596003773

Pub: O'Reilly Media, Inc.

Pub date: 2003-01-21

Amazon.co.uk Sales Rank: 256171

Check for 3rd party sellers (new/used)

Editorial Review:


Java applications are often seen as slower than native code apps--it's part of the cost of platform independence and ease of use. However, there are speed-up techniques modern coders ignore with fast CPUs and huge memories to cover for them.

Java Performance Tuning covers techniques applicable to coding in any programming language with those specific to not just Java but particular versions. Shirazi starts with an illuminating discussion of real speed versus the user's perception of speed, threading, caching, streaming, bench-marking and choosing what to measure.

Examples of generally applicable speed-up techniques include obvious examples such as moving unnecessary calculations to the outside of loops while Java-specific techniques include avoiding garbage collection. Some techniques are also applicable with other object-oriented languages; for example, reusing objects instead of recreating them.

The text is clear and readable. Everything discussed is shown as code examples with percentage timings to give an idea of the gains you can make. There is also extensive discussion on choosing algorithms.

Shirazi's coverage of distributed programs is particularly enlightening as they suffer from different bottlenecks, at least from a user point of view. Making a user feel the program is faster is often more a matter of retaining the user's attention than actually increasing speed--the Internet, for example, is unlikely to respond to code enhancements.

Because a better understanding of the way your programs work also makes for greater memory efficiency, more robustness and a better user experience--as well as more speed--this book will dramatically improve your programs. --Steve Patient

Reader Reviews:


5/5 stars

Awesome book (1/1 people found this helpful)

This is an excellent book, with something like 300 tuning techniques covered. Some techniques are more hairy than others, but the breadth and depth is astonishing. I did extensive research before buying this book. I found that it was in the top 3 editors choice for Java book at Javaworld a couple of times, in the top 20 Java books readers choice at JDJ a couple of times (note that is all "Java" books, not "Java Performance" books), it was the choice of a comparative review of Java performance books, it had good reviews by every professional review I could find, and finally, after having read it, it is one of the few Java books I keep handy as a reference.

2/5 stars

Disappointed (6/8 people found this helpful)

I never thought that I would feel so let down by an O’Reilly book. This one made me feel like "QinetiQ". I was looking for something as useful as O’Reilly’s Oracle performance tuning book and more up-to-date than Sun's "Enterprise Java Performance". No, I found a book full of a mix of useless examples and pathetic rhetoric.
The author likes telling you about C - I don’t care about C, I’ve got a 3000-class java application suite to tune.
If you're at the stage where you need to re-write “java.lang.Object” then you don't need this book - you need "C for dummies".
His examples range from “Hey Look I Can Write Faster Code Than Sun!” to “But don’t run this example because it’s not polite to”.
I manage a team of programmers and I can't recommend this book to them. Hey - if you haven't read Sun's excellent "Effective Java" don't bother going near this book.
I only give this as much as two stars because of discussion of the 2-Ronnies compression algorithm example: "F U NE X?".
There are better books on the subject, or at least ones that will be of use to you.

5/5 stars

Fun and informative (2/2 people found this helpful)

Once the business rules have been settled and all that is left is to tune the code, then the fun starts. Like a race car mechanic trying to squeeze out a couple of extra MPH from a race car, the most fun in programming is to try squeeze out extra performance from some code. A book on performance tuning should understand that and make the topic fun. Reading this book it is clear that Jack Shirazi loves to tune code. He has done an incredible amount of detailed research on different JVMs to determine exactly how to make Java perform. But he is also practical. He explains how to find performance problems, which exact areas to concentrate on, and which areas to ignore. After reading this book you won't waste your time on areas of code that can't be easily optimized and instead you'll know how to concentrate on those places where you can get the most bang. The book has been updated from the earlier edition to bring all the information up to date with the latest JVMs. Best of all, an additional 250 pages has been added to the book covering J2EE including Servlets, JSPs, EJBs, and JDBC. "Java Performance Tuning" is a programmer's book. You are guaranteed to learn a lot of very neat and useful tricks. I doubt that there is another Java book on the market with as many "WOW!" moments in it. Buy it and watch your code zoom.

4/5 stars

Excellent coverage of a complex topic (1/1 people found this helpful)

You have been working on that Java application for two weeks and it's finally ready for testing. Your window for having the web site down is ten minutes but you aren't concerned. Three hours later with the program still running, you are more than concerned. Before you panic, pick up a copy of "Java Performance Tuning". This book is geared for serious developers who need to dramatically improve performance in their applications and are willing to dig deep into the code. For example, writing your own customized Reader and byte-to-char converter can be ten times faster than using the BufferedReader class. Shirazi starts off by showing how to measure performance and identify bottlenecks, including a way to override the Object class to measure object creation. Subsequent chapters discuss key performance issues and possible solutions. Topics covered include replacing Strings with char arrays, eliminating casting and minimizing object creation, removing method calls from inside of loops, writing your own sort routines instead of using Arrays.sort(), identifying the correct Collection object, using threading to improve performance, and optimizing distributed systems to decrease network communication. As Shirazi explains, some of the methods covered may violate encapsulation or other OO techniques so they should only be used when performance has been identified as a critical problem. Besides being well written, the book is fun. I found myself trying to figure out along with the author how to improve the performance of the various examples demonstrated in the book.

4/5 stars

Good and concise book (0/0 people found this helpful)

I like this book... as author focused to solve general issues in real world to get the performance.
I like that the book provides information in a well laid out, structured fashion.
good book and provides good food for thought.
this is not good for serious performance tuning so one may need other reference

Similar Products

Java Concurrency in Practice

Pro Java EE 5 Performance Management and Optimization (Pro)

Effective Java

Java Generics and Collections

Spring in Action

Categories

Amazon.co.uk places this book into the following categories:

Books -> Subjects -> Computing & Internet -> General
Books -> Subjects -> Computing & Internet -> Digital Lifestyle -> Online Shopping -> Amazon
Books -> Subjects -> Computing & Internet -> General AAS
Books -> Subjects -> Computing & Internet -> Programming -> General AAS
Books -> Subjects -> Computing & Internet -> Programming -> Languages -> Java -> General AAS
Books -> Subjects -> Computing & Internet -> Software & Graphics -> General AAS
Books -> Special Features -> Search Inside!
Books -> Refinements -> Language (feature_browse-bin) -> English
Books -> Refinements -> Age (feature_two_browse-bin)
Books -> Refinements -> Format (binding_browse-bin) -> Paperback
Books -> Refinements -> Condition (condition-type)

 

ClanBrandon Books | Prague airport transfer | Dreamweaver | Short Term Missions | English Teacher Jobs in the Czech Republic
Czech Republic | Operation Mobilisation | Czech Republic Map