| |
| |
Preface | |
| |
| |
| |
Introduction | |
| |
| |
Why Is It Slow? | |
| |
| |
The Tuning Game | |
| |
| |
System Limitations and What to Tune | |
| |
| |
A Tuning Strategy | |
| |
| |
Perceived Performance | |
| |
| |
Starting to Tune | |
| |
| |
What to Measure | |
| |
| |
Don't Tune What You Don't Need to Tune | |
| |
| |
Performance Checklist | |
| |
| |
| |
Profiling Tools | |
| |
| |
Measurements and Timings | |
| |
| |
Garbage Collection | |
| |
| |
Method Calls | |
| |
| |
Object-Creation Profiling | |
| |
| |
Monitoring Gross Memory Usage | |
| |
| |
Client/Server Communications | |
| |
| |
Performance Checklist | |
| |
| |
| |
Underlying JDK Improvements | |
| |
| |
Garbage Collection | |
| |
| |
Replacing JDK Classes | |
| |
| |
Faster VMs | |
| |
| |
Better Optimizing Compilers | |
| |
| |
Sun's Compiler and Runtime Optimizations | |
| |
| |
Compile to Native Machine Code | |
| |
| |
Native Method Calls | |
| |
| |
Uncompressed ZIP/JAR Files | |
| |
| |
Performance Checklist | |
| |
| |
| |
Object Creation | |
| |
| |
Object-Creation Statistics | |
| |
| |
Object Reuse | |
| |
| |
Avoiding Garbage Collection | |
| |
| |
Initialization | |
| |
| |
Early and Late Initialization | |
| |
| |
Performance Checklist | |
| |
| |
| |
Strings | |
| |
| |
The Performance Effects of Strings | |
| |
| |
Compile-Time Versus Runtime Resolution of Strings | |
| |
| |
Conversions to Strings | |
| |
| |
Strings Versus char Arrays | |
| |
| |
String Comparisons and Searches | |
| |
| |
Sorting Internationalized Strings | |
| |
| |
Performance Checklist | |
| |
| |
| |
Exceptions, Casts, and Variables | |
| |
| |
Exceptions | |
| |
| |
Casts | |
| |
| |
Variables | |
| |
| |
Method Parameters | |
| |
| |
Performance Checklist | |
| |
| |
| |
Loops and Switches | |
| |
| |
Java.io.Reader Converter | |
| |
| |
Exception-Terminated Loops | |
| |
| |
Switches | |
| |
| |
Recursion | |
| |
| |
Recursion and Stacks | |
| |
| |
Performance Checklist | |
| |
| |
| |
I/O, Logging, and Console Output | |
| |
| |
Replacing System.out | |
| |
| |
Logging | |
| |
| |
From Raw I/O to Smokin' I/O | |
| |
| |
Serialization | |
| |
| |
Clustering Objects and Counting I/O Operations | |
| |
| |
Compression | |
| |
| |
Performance Checklist | |
| |
| |
| |
Sorting | |
| |
| |
Avoiding Unnecessary Sorting Overhead | |
| |
| |
An Efficient Sorting Framework | |
| |
| |
Better Than O(nlogn) Sorting | |
| |
| |
Performance Checklist | |
| |
| |
| |
Threading | |
| |
| |
User-Interface Thread and Other Threads | |
| |
| |
Race Conditions | |
| |
| |
Deadlocks | |
| |
| |
Synchronization Overheads | |
| |
| |
Timing Multithreaded Tests | |
| |
| |
Atomic Access and Assignment | |
| |
| |
Thread Pools | |
| |
| |
Load Balancing | |
| |
| |
Threaded Problem-Solving Strategies | |
| |
| |
Performance Checklist | |
| |
| |
| |
Appropriate Data Structures and Algorithms | |
| |
| |
Collections | |
| |
| |
Java 2 Collections | |
| |
| |
Hashtables and HashMaps | |
| |
| |
Cached Access | |
| |
| |
Caching Example I | |
| |
| |
Caching Example II | |
| |
| |
Finding the Index for Partially Matched Strings | |
| |
| |
Search Trees | |
| |
| |
Performance Checklist | |
| |
| |
| |
Distributed Computing | |
| |
| |
Tools | |
| |
| |
Message Reduction | |
| |
| |
Comparing Communication Layers | |
| |
| |
Caching | |
| |
| |
Batching I | |
| |
| |
Application Partitioning | |
| |
| |
Batching II | |
| |
| |
Low-Level Communication Optimizations | |
| |
| |
Distributed Garbage Collection | |
| |
| |
Databases | |
| |
| |
Performance Checklist | |
| |
| |
| |
When to Optimize | |
| |
| |
When Not to Optimize | |
| |
| |
Tuning Class Libraries and Beans | |
| |
| |
Analysis | |
| |
| |
Design and Architecture | |
| |
| |
Tuning After Deployment | |
| |
| |
More Factors That Affect Performance | |
| |
| |
Performance Checklist | |
| |
| |
| |
Underlying Operating System and Network Improvements | |
| |
| |
Hard Disks | |
| |
| |
CPU | |
| |
| |
RAM | |
| |
| |
Network I/O | |
| |
| |
Performance Checklist | |
| |
| |
| |
Further Resources | |
| |
| |
Books | |
| |
| |
Magazines | |
| |
| |
URLs | |
| |
| |
Profilers | |
| |
| |
Optimizers | |
| |
| |
Index | |