Most ebook files are in PDF format, so you can easily read them using various software such as Foxit Reader or directly on the Google Chrome browser.
Some ebook files are released by publishers in other formats such as .awz, .mobi, .epub, .fb2, etc. You may need to install specific software to read these formats on mobile/PC, such as Calibre.
Please read the tutorial at this link. https://ebooknice.com/page/post?id=faq
We offer FREE conversion to the popular formats you request; however, this may take some time. Therefore, right after payment, please email us, and we will try to provide the service as quickly as possible.
For some exceptional file formats or broken links (if any), please refrain from opening any disputes. Instead, email us first, and we will try to assist within a maximum of 6 hours.
EbookNice Team
Status:
Available4.5
30 reviews
ISBN 10: 0596003773
ISBN 13: 9780596003777
Author: Jack Shirazi
Performance has been an important issue for Java developers ever since the first version hit the streets. Over the years, Java performance has improved dramatically, but tuning is essential to get the best results, especially for J2EE applications. You can never have code that runs too fast.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.Java Performance Tuning offers common-sense advice about what to tune and what to leave alone, emphasizing techniques that provide big performance gains with minimal code restructuring. It gives you crucial guidance that helps you tune without destroying your program's architecture. Blindly changing things in an effort to make a program run faster is a great way to create buggy, unmaintainable code. Java Performance Tuning teaches you to work efficiently and effectively, resulting in code that is robust, maintainable, and fast.Java Performance Tuning, Second Edition shows you how to:Create a performance planGlean information about your program's behavior from profiling toolsIdentify bottlenecks before tuningMinimize the number of objects your program creates, particularly critical for J2EE applicationsOptimize the use of stringsAvoid performance penalties from inefficient codeImprove the behavior of loops and switchesOptimize I/O behaviorUse appropriate algorithms for sorting and other common tasksUse threads effectivelyOptimize the performance of distributed systemsSpeed up servlets and JSPsStructure JDBC usage efficientlyUse effective design patterns to optimize EJB performanceCovers JDK 1.4
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 Tools
Measurements 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 Profile Output
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 Heap
Starting 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 Do
What 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 assignments
Rename 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
Object-Creation Statistics
Object Reuse
Pool Management
ThreadLocals
Reusable Parameters
Canonicalizing Objects
String canonicalization
Changeable objects
Weak references
Enumerating constants
Reference Objects
Reference Types
SoftReference Flushing
The WeakHashMap Class
How WeakHashMap works
Some consequences of the WeakHashMap implementation
Avoiding Garbage Collection
Initialization
Early and Late Initialization
Preallocating Objects
Lazy Initialization
Performance Checklist
Chapter 5. Strings
The Performance Effects of Strings
Compile-Time Versus Runtime Resolution of Strings
Conversions to Strings
Converting longs to Strings
Converting ints to Strings
Converting bytes, shorts, chars, and booleans to Strings
Converting floats to Strings
Converting doubles to Strings
Converting Objects to Strings
Strings Versus char Arrays
Word-Counting Example
Line Filter Example
Line Filtering with Regular Expressions
String Comparisons and Searches
Sorting Internationalized Strings
Performance Checklist
Chapter 6. Exceptions, Assertions, Casts, and Variables
Exceptions
The Cost of try-catch Blocks Without an Exception
The Cost of try-catch Blocks with an Exception
Using Exceptions Without the Stack Trace Overhead
Conditional Error Checking
Assertions
Assertion Overhead
Casts
Variables
Method Parameters
Performance Checklist
Chapter 7. Loops, Switches, and Recursion
Loops
Move Code Out of the Loop
Use Temporary Variables
Don’t Terminate Loops with Method Calls
Use int for Index Variables
Use System.arraycopy( )
Use Efficient Comparisons
Put the Most Common Case First
Avoid Reflection
Tuning a Loop
Exception-Terminated Loops
Switches
Recursion
Recursion and Stacks
Performance Checklist
Chapter 8. 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
NIO
Connecting Client Sockets
Nondirect Buffers: Fast Casts for Primitive Arrays
Direct Buffers: Optimized I/O Operations
Multiplexing
Performance Checklist
Chapter 9. Sorting
Avoiding Unnecessary Sorting Overhead
An Efficient Sorting Framework
Better Than O(nlogn) Sorting
Performance Checklist
Chapter 10. Threading
User-Interface Thread and Other Threads
Race Conditions
Deadlocks
Synchronization Overhead
Desynchronization and Synchronized Wrappers
Avoiding Serialized Execution
Timing Multithreaded Tests
Atomic Access and Assignment
Thread Pools
Load Balancing
Free Load Balancing from TCP/IP
Load-Balancing Classes
A Load-Balancing Example
Threaded Problem-Solving Strategies
Performance Checklist
Chapter 11. Appropriate Data Structures and Algorithms
Collections
Java 2 Collections
Hashtables and HashMaps
Optimizing Queries
The Query Problem
Applying the Boolean-OR operator optimization
Eliminating the unnecessarily repeated method call
Eliminating casts and extra access calls
Avoiding synchronization
Avoiding the method accessor
Tighter typing of the collection elements
Optimizing map queries
Comparing LinkedLists and ArrayLists
The Vector and ArrayList Implementations
The LinkedList Implementation
Performance Tests
Querying Performance
The RandomAccess Interface
What Does RandomAccess Mean?
How Is RandomAccess Used?
Speedup from RandomAccess
Forward and Backward Compatibility
Cached Access
Caching Examples
Finding the Index for Partially Matched Strings
Search Trees
Performance Checklist
Chapter 12. Distributed Computing
Tools
Message Reduction
CORBA Example
RMI Example
Proprietary Communications Layer
Comparing Communications Layers
Caching
Batching I
Application Partitioning
Batching II
Low-Level Communication Optimizations
Compression
Caching
Transfer Batching
Multiplexing
Distributed Garbage Collection
Databases
Web Services
Measuring Web Services Performance
Measuring server-side method execution time
Measuring the full round-trip time
Inferring round-trip overhead
Inferring network communication time
Inferring DNS lookup time
Inferring marshalling time
High-Performance Web Services
Service granularity
Load balancing
Asynchronous processing
Performance Checklist
Chapter 13. When to Optimize
When Not to Optimize
Tuning Class Libraries and Beans
Analysis
Design and Architecture
Shared Resources
Transactions
Locking
Parallelism
Data parallelism
Scaling
Distributed Applications
Object Design
Techniques for Predicting Performance
Factor in comparative performance of operations
Consider the relative costs of different types of accesses and updates
Use simulations and benchmarks
Consider the total work done and the design overhead
Focus on shared resources
Predict the effects of parallelism
Assess the costs of data conversions
Determine whether batch processing is faster
Tuning After Deployment
More Factors That Affect Performance
User Interface Usability
Training
Server Downtime
Performance Planning
Performance Checklist
Chapter 14. Underlying Operating System and Network Improvements
Hard Disks
Disk I/O
Clustering Files
Cached Filesystems (RAM Disks, tmpfs, cachefs)
Disk Fragmentation
Disk Sweet Spots
CPU
CPU Load
Process Priorities
RAM
Network I/O
Latency
TCP/IP Stacks
Network Bottlenecks
DNS Lookups
Performance Checklist
Chapter 15. J2EE Performance Tuning
Performance Planning
J2EE Monitoring and Profiling Tools
Features to Look For
J2EE Monitoring Tools
Measurements: What, Where, and How
An Instructive Analysis
Suggested Measurements
Symptoms of Performance Problems
Useful Statistics to Analyze from Measurements
Load Testing
User Perception
Screen Navigation
Page Display
Priority Service
Internet Congestion
Communication Failures
Good Peak Performance
Cumulative Delay and User Impatience
User Bandwidth
Clustering and Load Balancing
Load-Balancing Mechanisms
DNS load balancing
Hardware load balancer
Load-balancing dispatcher/Proxy load balancing
URL-based load balancing
Server-pooled objects
Client-based load balancing
Application configuration load balancing
Database partitioning
Load-Balancing Algorithms
Tuning JMS
Performance Checklist
Chapter 16. Tuning JDBC
Measuring JDBC Performance
The Core java.sql Interfaces
Wrapping Classes Using Proxy Objects
Wrapping the Connection class
Wrapping the Statement classes
Wrapping the ResultSet class
The JDBC wrapper framework
Using the JDBC wrapper framework
Tuning JDBC
JDBC Drivers
Type 1: JDBC-bridging driver
Type 2: Native API, part-Java driver
Type 3: Pure Java driver for database middleware
Type 4: Pure Java driver direct to a database
Connection Pooling
Optimizing SQL
Set-Based Processing
Database Server-Side Processing
Minimizing Transferred Data
Caching
Prepared Statements
Batching
Batching accesses by optimizing row fetching
Batching updates
Data Structures
Minimizing Data-Conversion Overhead
Metadata
Handling Exceptions
Stored Procedures
Transaction Optimization
Auto-commit mode
Transaction levels
User-controlled transactions
Savepoints and distributed transactions
Database Location
Performance Checklist
Chapter 17. Tuning Servlets and JSPs
Don’t Use SingleThreadModel
Efficient Page Creation and Output
Minimize Output and Logging
Use Strings Efficiently
Use Bytes Versus Chars
Use Network Buffers Efficiently
Display Static Pages Quickly
Optimize Data Conversions
Use ServletOutputStream Directly (Servlets Only)
Optimize Partial Page Display
Body Tags
Use Include Directive, Not Action
Minimize Scope of useBean Action
Minimize Custom Tags
Use Redirects Versus Forwards
Cache Tags
HttpSession
Timing Out Sessions
HttpSession Versus Stateful Session Beans
HttpSession Serialization
Distributing Sessions for Higher Scalability
Efficient Resource Management
Compression
More Performance Tips
Case Study: Ace’s Hardware SPECmine Tool
Performance Checklist
Chapter 18. Tuning EJBs
Primary Design Guidelines
Coarse-Grained EJBs Are Faster
EJBs Are Not Data Wrappers
Read-Only Data Is Different
Stateless Session Beans Are Faster
Cache JNDI Lookups
CMP or BMP?
EJB Transactions
Performance-Optimizing Design Patterns
Reducing the Number of Network Trips: The Value Object Pattern
Optimizing Database Access: The Data Access Object Pattern and the Fast Lane Reader Pattern
Efficiently Transferring Large Datasets: The Page-by-Page Iterator Pattern and the ValueListHandl...
Caching Services: The Service Locator, Verified Service Locator, and EJBHomeFactory Patterns
Combining EJBs: The Session Façade and CompositeEntity Patterns
Reusing Objects: The Factory and Builder Patterns
Reducing Locking Conflicts: The Optimistic Locking Pattern
Load Balancing: The Reactor and Front Controller Patterns
Optimized Message Handling: The Proxy and Decorator Patterns
Optimizing CPU Usage: The Message Façade Pattern
The Application Server
Security Layer
Gross Configuration
Tuning Application Servers
More Suggestions for Tuning EJBs
Case Study: The Pet Store
Case Study: Elite.com
Performance Checklist
java performance tuning 2nd edition pdf
java high performance
performance java book
java performance second edition
java performance 2nd edition
z performance and dyno
java performance tuning book
Tags: Jack Shirazi, Java, Performance