- New Search
- » Java performance tuning
Java performance tuning
Author
Publisher
O'Reilly
Publication Date
Varies, see individual formats and editions
Language
English
2003 O'Reilly
2nd ed.
OReilly (ebooks & videos)
1 online resource (xv, 570 pages) : illustrations
Available Online
©2000 O'Reilly
1st ed.
OReilly (ebooks & videos)
1 online resource (xiv, 426 pages) : illustrations.
Available Online
Description
Loading Description...
Table of Contents
From the eBook - 2nd ed.
Table of Contents; Preface; Contents of This Book; New in the Second Edition; Virtual Machine (VM) Versions; Conventions Used in This Book; Comments and Questions; Acknowledgments; Chapter 1. Introduction; Why Is It Slow?; The Tuning Game; System Limitations and What to Tune; A Tuning Strategy; Perceived Performance; Threading to Appear Quicker; Streaming to Appear Quicker; Caching to Appear Quicker; Starting to Tune; User Agreements; Setting Benchmarks; The Benchmark Harness; Taking Measurements; What to Measure; Don't Tune What You Don't Need to Tune; Performance Checklist
Chapter 2. Profiling ToolsMeasurements and Timings; Garbage Collection; Using -verbosegc to Analyze Garbage Collection; Tools for Analyzing -verbosegc Output; Method Calls; Profiling Methodology; Java 2 cpu=samples Profile Output; HotSpot and 1.3 -Xprof Profile Output; JDK 1.1.x -prof and Java 2 cpu=old ProfileOutput; Java 2 -Xhprof Option; Java 2 -Xaprof option; Object-Creation Profiling; Monitoring Gross Memory Usage; Client/Server Communications; Replacing Sockets; Performance Checklist; Chapter 3. Underlying JDK Improvements; Garbage Collection; Tuning the Heap; Gross Tuning
Problems with a Larger HeapStarting Versus Maximum Heap Size; Benchmarking Considerations; Fine-Tuning the Heap; Expanding the Heap; Minimizing Pauses; Incremental or "train" GC; Concurrent GC; Enlarge the "new" space; Disabling System.gc() Calls; Tuning RMI Garbage Collection; Extreme Heap and Intimate Shared Memory; Loading a Huge Number of Classes; Per-Thread Stack Size; Eliminate Finalizers; Sharing Memory; Replacing JDK Classes; Faster VMs; VM Speed Variations; VMs with JIT Compilers; VM Startup Time; Other VM Optimizations; Better Optimizing Compilers
What Optimizing Compilers Cannot DoWhat Optimizing Compilers Can Do; Remove unused methods and classes; Increase statically bound calls; Cut dead code and unnecessary instructions, including checks for null; Use computationally cheaper alternatives (strength reduction); Replace runtime computations with compiled results; Remove unused fields; Remove unnecessary parts of compiled files; Reduce necessary parts of compiled files; Alter access control to speed up invocations; Inline calls; Remove dynamic type checks; Unroll loops; Code motion; Eliminate common subexpressions
Eliminate unnecessary assignmentsRename classes, fields, and methods; Reorder or change bytecodes; Generate information to help a VM; Managing Compilers; Sun's Compiler and Runtime Optimizations; Optimizations You Get for Free; Literal constants are folded; String concatenation is sometimes folded; Constant fields are inlined; Dead code branches are eliminated; Optimizations Performed When Using the -O Option; Performance Effects From Runtime Options; Compile to Native Machine Code; Native Method Calls; Uncompressed ZIP/JAR Files; Performance Checklist; Chapter 4. Object Creation
From the eBook - 1st ed.
Why Is It Slow? --
2
.
Tuning Game --
3
.
System Limitations and What to Tune --
3
.
A Tuning Strategy --
5
.
Perceived Performance --
6
.
Starting to Tune --
10
.
What to Measure --
15
.
Don't Tune What You Don't Need to Tune --
17 --
2. Profiling Tools --
20
.
Measurements and Timings --
21
.
Garbage Collection --
23
.
Method Calls --
26
.
Object-Creation Profiling --
43
.
Monitoring Gross Memory Usage --
50
.
Client/Server Communications --
56 --
3. Underlying JDK Improvements --
64
.
Garbage Collection --
64
.
Replacing JDK Classes --
66
.
Faster VMs --
68
.
Better Optimizing Compilers --
73
.
Sun's Compiler and Runtime Optimizations --
82
.
Compile to Native Machine Code --
89
.
Native Method Calls --
90
.
Uncompressed ZIP/JAR Files --
91 --
4. Object Creation --
94
.
Object-Creation Statistics --
96
.
Object Reuse --
97
.
Avoiding Garbage Collection --
112
.
Initialization --
115
.
Early and Late Initialization
117 --
5. Strings --
122
.
Performance Effects of Strings --
122
.
Compile-Time Versus Runtime Resolution of Strings --
125
.
Conversions to Strings --
126
.
Strings Versus char Arrays --
142
.
String Comparisons and Searches --
150
.
Sorting Internationalized Strings --
153 --
6. Exceptions, Casts, and Variables --
161
.
Exceptions --
161
.
Casts --
167
.
Variables --
169
.
Method Parameters --
172 --
7. Loops and Switches --
174
.
Java.io. Reader Converter --
178
.
Exception-Terminated Loops --
184
.
Switches --
189
.
Recursion --
195
.
Recursion and Stacks --
200 --
8. I/O, Logging, and Console Output --
204
.
Replacing System.out --
206
.
Logging --
208
.
From Raw I/O to Smokin' I/O --
209
.
Serialization --
217
.
Clustering Objects and Counting I/O Operations --
230
.
Compression --
232 --
9. Sorting --
237
.
Avoiding Unnecessary Sorting Overhead --
237
.
An Efficient Sorting Framework --
241
Better Than O(nlogn) Sorting --
249
.
Performance Checklist --
255 --
10. Threading --
256
.
User-Interface Thread and Other Threads --
258
.
Race Conditions --
259
.
Deadlocks --
261
.
Synchronization Overheads --
265
.
Timing Multithreaded Tests --
275
.
Atomic Access and Assignment --
276
.
Thread Pools --
278
.
Load Balancing --
279
.
Threaded Problem-Solving Strategies --
291 --
11. Appropriate Data Structures and Algorithms --
293
.
Collections --
294
.
Java 2 Collections --
296
.
Hashtables and HashMaps --
298
.
Cached Access --
302
.
Caching Example I --
303
.
Caching Example II --
306
.
Finding the Index for Partially Matched Strings --
310
.
Search Trees --
314 --
12. Distributed Computing --
335
.
Tools --
337
.
Message Reduction --
339
.
Comparing Communication Layers --
342
.
Caching --
344
.
Batching I --
346
.
Application Partitioning --
347
.
Batching II --
348
.
Low-Level Communication Optimizations
349
.
Distributed Garbage Collection --
354
.
Databases --
355 --
13. When to Optimize --
357
.
When Not to Optimize --
358
.
Tuning Class Libraries and Beans --
359
.
Analysis --
362
.
Design and Architecture --
366
.
Tuning After Deployment --
382
.
More Factors That Affect Performance --
383 --
14. Underlying Operating System and Network Improvements --
389
.
Hard Disks --
390
.
CPU --
395
.
RAM --
397
.
Network I/O --
398.
Excerpt
Loading Excerpt...
Author Notes
Loading Author Notes...
More Details
ISBN
9780596003777
9780596152345
9780596516970
9780596152345
9780596516970
Reviews from GoodReads
Loading GoodReads Reviews.
Staff View
Loading Staff View.