Java performance tuning

No matter what language they're programming in, developers always wish things would run faster! Especially when writing mission-critical applications, no one wants to be limited by the programming environment. Java Performance Tuning provides all the details you need to know to "performanc...

Descripción completa

Detalles Bibliográficos
Autor principal: Shirazi, Jack (-)
Formato: Libro electrónico
Idioma:Inglés
Publicado: Cambridge, Mass. : O'Reilly 2000.
Edición:1st ed
Colección:Java series (O'Reilly & Associates)
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009627185006719
Tabla de Contenidos:
  • 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.