1-877-WEBUCATE
(1-877-932-8228)
info@webucator.com
 
Microsoft Training
Java Training
XML Training
Database & SQL Training
PHP, Perl, ASP, Groovy, Grails, Ruby on Rails Training
HTML, JavaScript, Ajax & CSS Training
Adobe Training
◊ PRIVATE CORE JAVA TRAINING


Need a private class for your team delivered at your site or a location near you?
For private groups of three or more, Webucator offers completely customizable and cost-effective Core Java classes delivered at your offices or a location near you.

To have someone contact you about these classes, please fill out the form below.

* (Required)
* (Required)
* (Required)
* (Required)
* (Required)
(The number of people requiring training)
(For Federal Government Pricing)
* (Required)

Java Performance Tuning (5 days)


This Core Java class is delivered for private groups onsite at your offices or a location of your choice. It can also be delivered via the Internet for geographically distributed staff.

Click here for our public Core Java classes

Java Performance Tuning Course Overview

Java code has a deserved reputation for ease of programming compared to languages such as C++. Reasons include the simplification of the language, the stronger type checking and the garbage collector. Java has an underserved reputation for executing slowly. Though Java in the early years did perform poorly, modern implementations deliver Java execution speeds that rival and often surpass C++ speeds in many environments. Unfortunately, in many cases, even these speeds are insufficient to deliver the performance that is needed from Java programs.

Typical Java code can be speeded up by a factor of three or more, through judicious use of Java constructs. For example, over use of object creation and the subsequent garbage collection can slow Java programs down significantly. Use of an older JVM can likewise slow a program significantly. Many common constructs can be speeded up by a factor of 10 or more, by using more sophisticated Java idioms. This course teaches Java Performance Tuning techniques, that can help a Java Developer write super fast Java code.

The exact speedup that Java Performance Tuning provides will vary from program to program; it is expected that Java programmers who use the techniques taught in this course will be able identify the bottlenecks in their Java code and speedup those bottle necks by a factor of three or more. Most of the techniques that this course teaches are very simple; others are more complex.

Some of the topics that this course will explore include the use of the Java APIs, as well as other APIs; comparing the speed of various JVM implementations; use timing and profiling to gain an understanding of the performance of a program; use pools and threads effectively; control the garbage collector; use Strings and related data types effectively; and learn all kinds of techniques that affect day to Java programming.

Trademarks used: Java® |

Java Performance Tuning Course Goals

  • Understand the trade-offs between performance and simplicity.
  • Know the most common performance pitfalls in Java code
  • Know 15-25 patterns that you can use to make your Java software perform sizzling fast.
  • Know how to obtain performance measurements using profilers and other tools
  • Be able to avoid memory wastage and memory leaks
  • Understand the performance differences between different JVMs
  • Know Java Tricks of the Trade
  • Know what does not affect performance
  • Manage object creation
  • Know how to effectively use threads and synchronization
  • Work with databases effectively
  • Select Data Structures and Algorithms
  • Diagnose Performance Problems

Java Performance Tuning Course Prerequisites

Experience in the following areas is required:

  • Java Programming

Java Performance Tuning Course Outline

  1. Basic Principles
    1. The Performance Problem
    2. The 6 main performance costs: Memory, CPU Time, Network Traffic, I/O, System Calls, Resource Blocking
    3. Trading performance for maintainability
    4. Trading performance for security
    5. Different JVMs have different performance capabilities
    6. Hiding bad performance
  2. Obtaining Performance Measurements
    1. Creating Performance Prototypes
    2. Timing Language Features
    3. Timing the cost of reflection
    4. Using Multiple JVMs
    5. The effect of unrolling loops
  3. Memory Management and The Garbage Collector
    1. Understanding the Java Garbage Collector
    2. Is the Garbage Collector Good Enough?
    3. Controlling and tuning the Java Garbage Collector
  4. Basic Profiling Techniques - Measuring Time
    1. What is a Profiler
    2. The Uses of a Profiler
    3. Understanding Profiler Output
    4. Using the Profiler to tune your program
  5. Crafting a Service Level Agreement
    1. Structure of a SLA
    2. Meeting SLA Goals
  6. Simple Things to do
    1. Steps of Java Performance Tuning
    2. equals() and ==
    3. short circuit operators
    4. local variables vs. instance variables
    5. move code out of loops
    6. unrolling loops
    7. switches with consecutive case values
    8. factoring out common expressions
  7. Simple Java Tricks of the Trade
    1. Primitive vs. Wrapper Types
    2. String vs. String Buffer
    3. Early and Late Initialization
    4. Use 'static's
    5. Patterns for Enums
    6. Reuse Exception Instances
    7. The equals and hashCode methods
    8. Factoring out common subexpressions
  8. Strings and String Buffers
    1. Constructing Strings
    2. Comparing Strings
    3. Interning Strings
    4. Substrings of Strings
    5. Using char[]
  9. Take Control of Object Creation
    1. Factory Methods
    2. Polymorphic Construction
    3. Create Fewer Objects
    4. Use Primitives
    5. Readonly and Immutable Objects
    6. Lockable Objects
    7. Creating Hashtables of Immutable Objects
    8. Moving Object Creation to outside loops
    9. Using Out Parameters
    10. Canonicalize Objects
  10. Manage Garbage Collection
    1. Set References to null
    2. Using Hashtables Correctly
    3. Threads and Locked Memory
    4. Reuse Exceptions
  11. Using the Profiler to Track Memory
    1. Tracking Memory with the Profiler
    2. Using Binary Information with HAT
  12. Weak and Soft References
    1. Weak References
    2. Soft References
    3. Weak and Soft Hashtables
    4. Interaction with Garbage Collection Settings
  13. The Apache Commons Pool
    1. Benefits of Pools
    2. Profile Pool Usage
    3. Apache Commons Pools\
    4. Generic Object Factory
    5. Poolable Object Factories
    6. Pool Exhaustion Behavior
    7. Object Activation and Passivation
    8. Shrinking the Pool
    9. Keyed Pools
  14. Collection Classes
    1. Does Presizing Collection Classes make a difference
    2. Understanding Computational Complexity of Collection Classes
    3. Understanding Hashcodes
    4. Use Arrays when you can
  15. Exceptions and Try Catch Blocks
    1. Cost of Try Catch Blocks
    2. Cost of Throwing Exceptions vs. Returning a Value
    3. Reusing Exception Instances
  16. Threads and Synchronization (optional)
    1. What are Threads
    2. Producer Consumer Problems
    3. The Behavioral Challenges of Multi Threaded Code
    4. Strategies in Thread Scheduling
    5. Thread Overhead
    6. Using Thread Pools
    7. Using Thread Queues
    8. The Benefits and Cost of Synchronization
    9. Using Synchronization Wrappers
    10. JDK 1.5 Thread Packages
    11. JDK 1.5 Executor Interface
    12. JDK 1.5 Atomic Objects
    13. JDK 1.5 Latches
    14. JDK 1.5 Atomic Based Hashmaps
    15. JDK 1.5 Buffer Exchanges
    16. General Threading Considerations - Deadlocks and Fairness
  17. Java and Databases
    1. Working with the Database Administrator
    2. JDBC Drivers - Prepared Statements are stored on a "per connection" basis
    3. Some Core JDBC Speedups
    4. Crafting a Select Statement
    5. Managing Transactions Well
    6. Using Local or In memory Database
  18. Performance Enhancing Design Patterns (optional)
    1. The Observer Pattern
  19. Faking out the User
    1. Increase User Satisfaction Psychologically
    2. Anticipate Look Ahead
  20. Very Advanced Techniques
    1. Multiple Programs Share one JVM
    2. Write Your Own Core Technologies
    3. Use JNI
    4. Write your own Serialization methods

Java Performance Tuning Course Materials

In addition to a comprehensive set of materials, including course notes and all the programming examples, each student will also receive a one-year subscription to Webucator's online reference library, which contains hundreds of the most current electronic technology books - a $149.95 per student value.

Java Performance Tuning Course Technical Requirements and Setup Instructions

Click here for technical requirements and setup instructions

Java® and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
home - onsite classes - instructor-led online courses - self-paced online courses - why webucator - partners - contact - sitemap
© 2009 Webucator. All rights reserved. info@webucator.com | Toll Free: 877-WEBUCATE (877-932-8228) | From Outside the USA: 315-849-2724 | Fax: 315-410-5320
Phoenix, AZ | Santa Clara, CA | Santa Clara, CA | Los Angeles, CA | Sacramento, CA | Washington, DC | Atlanta, GA | Chicago, IL | Indianapolis, IN | Muncie, IN
New Orleans, LA Boston, MA | Cambridge, MA | Charlestown, MA | Framingham, MA | Ipswich, MA | Lincoln, MA | Wellesley, MA | Worcester, MA | Bangor, ME | Detroit, MI
Raleigh, NC Winston-Salem, NC | Lincoln, NE | East Hanover, NJ | Eatontown, NJ | Madison, NJ | Parsippany, NJ | Trenton, NJ | Albany, NY | Buffalo, NY | Rochester, NY
New York City, NY | Syracuse, NY | West Babylon, NY | Dayton, OH | Bethlehem, PA | Philadelphia, PA | Pittsburgh, PA | Pittsburgh, PA | State College, PA
Middletown, RI | Rapid City, SD | Austin, TX | Dallas, TX | Houston, TX | Arlington, VA | McLean, VA | Seattle, WA | Toronto, Canada | Ottawa, Canada | Calgary, CA