2008年(3010)
分类: LINUX
2008-05-27 22:25:23
This book was written with one goal in mind: to provide Java programmers with the expertise needed to build efficient, scalable Java code. The author shares his experience in server-side performance tuning through measured performance assessments, called optimizations. Each optimization discusses techniques to improve the performance and scalability of your code. Every claim is substantiated with hard numbers and an experience-based evaluation. Java(TM) Performance and Scalability, Volume 1, provides invaluable advice that you will, no doubt, find useful in your coding.
Presented in 48 concise lessons that target the most common and critical performance pitfalls, this book offers a plethora of practical tips and solutions for boosting the performance of your programs. These lessons cover performance-critical areas such as memory management, garbage collection, caching, and multithreading.
Specific lessons include:
Reserving StringBuffer capacity
Avoiding premature object creation
Creating an efficient vector class
Designing caching into your API
The cost of synchronization
Parallel subtasks
JNI efficiency
Varying the server workload and RMI network plumbing
Using ServletOutputStream
Caching JDBC(TM) connections
In addition to providing hard numbers that quantify the optimizations, the author concludes the book with an application demonstrating the effectiveness of the performance optimizations. The exercise takes a typical program and increases its performance fourfold through a series of steps that tie together the lessons learned throughout the book. He offers both the means and the proof to better coding.