Buying Options
Java Performance Tuning, Second Edition
Print $44.95
Add to Cart
Print+Ebook $49.45
Add to Cart
Ebook $35.99
(PDF)
Add to Cart
Safari Books Online
Add to Cart
What is this?
Print £34.50
Add to Cart
What is this?

Product Editions

  1. Java Performance Tuning, Second Edition - January 2003
  2. Java Performance Tuning - September 2000
Description

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. For this reason, Java Performance Tuning, Second Edition includes four new chapters: a new chapter on J2EE application tuning in general followed by chapters on tuning JDBC, servlets and JSPs, and EJBs.

Full Description
Table of Contents
  1. Chapter 1 Introduction

    1. Why Is It Slow?

    2. The Tuning Game

    3. System Limitations and What to Tune

    4. A Tuning Strategy

    5. Perceived Performance

    6. Starting to Tune

    7. What to Measure

    8. Don't Tune What You Don't Need to Tune

    9. Performance Checklist

  2. Chapter 2 Profiling Tools

    1. Measurements and Timings

    2. Garbage Collection

    3. Method Calls

    4. Object-Creation Profiling

    5. Monitoring Gross Memory Usage

    6. Client/Server Communications

    7. Performance Checklist

  3. Chapter 3 Underlying JDK Improvements

    1. Garbage Collection

    2. Tuning the Heap

    3. Gross Tuning

    4. Fine-Tuning the Heap

    5. Sharing Memory

    6. Replacing JDK Classes

    7. Faster VMs

    8. Better Optimizing Compilers

    9. Sun's Compiler and Runtime Optimizations

    10. Compile to Native Machine Code

    11. Native Method Calls

    12. Uncompressed ZIP/JAR Files

    13. Performance Checklist

  4. Chapter 4 Object Creation

    1. Object-Creation Statistics

    2. Object Reuse

    3. Reference Objects

    4. Avoiding Garbage Collection

    5. Initialization

    6. Early and Late Initialization

    7. Performance Checklist

  5. Chapter 5 Strings

    1. The Performance Effects of Strings

    2. Compile-Time Versus Runtime Resolution of Strings

    3. Conversions to Strings

    4. Strings Versus char Arrays

    5. String Comparisons and Searches

    6. Sorting Internationalized Strings

    7. Performance Checklist

  6. Chapter 6 Exceptions, Assertions, Casts, and Variables

    1. Exceptions

    2. Assertions

    3. Casts

    4. Variables

    5. Method Parameters

    6. Performance Checklist

  7. Chapter 7 Loops, Switches, and Recursion

    1. Loops

    2. Tuning a Loop

    3. Exception-Terminated Loops

    4. Switches

    5. Recursion

    6. Recursion and Stacks

    7. Performance Checklist

  8. Chapter 8 I/O, Logging, and Console Output

    1. Replacing System.out

    2. Logging

    3. From Raw I/O to Smokin' I/O

    4. Serialization

    5. Clustering Objects and Counting I/O Operations

    6. Compression

    7. NIO

    8. Performance Checklist

  9. Chapter 9 Sorting

    1. Avoiding Unnecessary Sorting Overhead

    2. An Efficient Sorting Framework

    3. Better Than O(nlogn) Sorting

    4. Performance Checklist

  10. Chapter 10 Threading

    1. User-Interface Thread and Other Threads

    2. Race Conditions

    3. Deadlocks

    4. Synchronization Overhead

    5. Timing Multithreaded Tests

    6. Atomic Access and Assignment

    7. Thread Pools

    8. Load Balancing

    9. Threaded Problem-Solving Strategies

    10. Performance Checklist

  11. Chapter 11 Appropriate Data Structures and Algorithms

    1. Collections

    2. Java 2 Collections

    3. Hashtables and HashMaps

    4. Optimizing Queries

    5. Comparing LinkedLists and ArrayLists

    6. The RandomAccess Interface

    7. Cached Access

    8. Caching Examples

    9. Finding the Index for Partially Matched Strings

    10. Search Trees

    11. Performance Checklist

  12. Chapter 12 Distributed Computing

    1. Tools

    2. Message Reduction

    3. Comparing Communications Layers

    4. Caching

    5. Batching I

    6. Application Partitioning

    7. Batching II

    8. Low-Level Communication Optimizations

    9. Distributed Garbage Collection

    10. Databases

    11. Web Services

    12. Performance Checklist

  13. Chapter 13 When to Optimize

    1. When Not to Optimize

    2. Tuning Class Libraries and Beans

    3. Analysis

    4. Design and Architecture

    5. Tuning After Deployment

    6. More Factors That Affect Performance

    7. Performance Planning

    8. Performance Checklist

  14. Chapter 14 Underlying Operating System and Network Improvements

    1. Hard Disks

    2. CPU

    3. RAM

    4. Network I/O

    5. Performance Checklist

  15. Chapter 15 J2EE Performance Tuning

    1. Performance Planning

    2. J2EE Monitoring and Profiling Tools

    3. Measurements: What, Where, and How

    4. Load Testing

    5. User Perception

    6. Clustering and Load Balancing

    7. Tuning JMS

    8. Performance Checklist

  16. Chapter 16 Tuning JDBC

    1. Measuring JDBC Performance

    2. Tuning JDBC

    3. Performance Checklist

  17. Chapter 17 Tuning Servlets and JSPs

    1. Don't Use SingleThreadModel

    2. Efficient Page Creation and Output

    3. Body Tags

    4. Cache Tags

    5. HttpSession

    6. Compression

    7. More Performance Tips

    8. Case Study: Ace's Hardware SPECmine Tool

    9. Performance Checklist

  18. Chapter 18 Tuning EJBs

    1. Primary Design Guidelines

    2. Performance-Optimizing Design Patterns

    3. The Application Server

    4. More Suggestions for Tuning EJBs

    5. Case Study: The Pet Store

    6. Case Study: Elite.com

    7. Performance Checklist

  19. Chapter 19 Further Resources

    1. The Primary Resource

    2. Books

    3. Magazines

    4. URLs

    5. Profilers

    6. Optimizers

  1. Colophon

View Full Table of Contents
Product Details
Title:
Java Performance Tuning, Second Edition
By:
Jack Shirazi
Publisher:
O'Reilly Media
Formats:
  • Print
  • Ebook
  • Safari Books Online
Print Release:
January 2003
Ebook Release:
June 2009
Pages:
592
Print ISBN:
978-0-596-00377-7
| ISBN 10:
0-596-00377-3
Ebook ISBN:
978-0-596-55613-6
| ISBN 10:
0-596-55613-6
Customer Reviews
About the Author
  1. Jack Shirazi

    Jack Shirazi is an independent consultant. He was an early adopter of Java, and for the last few years has consulted mainly for the financial sector, focusing on Java performance. Before using Java, Jack spent many years tuning Smalltalk applications. Jack's early career involved research in theoretical physics and bioinformatics. Jack has publications in the field of protein structure and is proud to have contributed to some of the core Perl5 modules.

    View Jack Shirazi's full profile page.

Colophon

Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animal on the cover of Java Performance Tuning is a serval (Leptailarus serval). This long-legged cat is found in most parts of Africa, except for very dry areas of the continent, such as the northern regions around the Sahara Desert. Servals range in color from light brown to a darker reddish brown (some servals are entirely black); their coats are covered with dark spots that merge into stripes along the upper part of their backs. The pattern of their markings varies geographically; servals from wetter areas have smaller, finer spots, while those from drier areas have larger marks. Servals can grow up to 3 feet long and 20 inches tall at the shoulder, making their legs very long in proportion to their bodies. They use this height to their advantage, as they are able to see movement in the tall grass in which they hunt for the hares, rodents, and small birds they like to eat. Their big ears and highly developed auditory systems enable them to hear the high-pitched, ultrasonic sounds made by rodents-- they are even able to hear them tunneling underground -- and they can also leap up to 10 feet into the air to catch birds. Emily Quill was the production editor and proofreader for Java Performance Tuning, Second Edition. Ann Schirmer was the copyeditor. Linley Dolby and Philip Dangler provided quality control. Ellen Troutman wrote the index.

Emma Colby designed the cover of this book, based on a series design by Edie Freedman. The cover image is a 19th-century engraving from the Couvier Pictorial Archive. Emma Colby produced the cover layout with QuarkXPress 4.1 using Adobe's ITC Garamond font.

David Futato designed the interior layout. This book was converted to FrameMaker 5.5.6 by Joe Wizda and Judy Hoer with a format conversion tool created by Erik Ray, Jason McIntosh, Neil Walls, and Mike Sierra that uses Perl and XML technologies. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono Condensed. The illustrations that appear in the book were produced by Robert Romano and Jessamyn Read using Macromedia FreeHand 9 and Adobe Photoshop 6. The tip and warning icons were drawn by Christopher Bing. This colophon was written by Leanne Soylemez.

  • Book cover of Java Performance Tuning