Find the causes of code performance problems


+

Search Tips   |   Advanced Search

 

Overview

After you have collected response time breakdown data, you can analyze the results in the profiling tools to identify exactly what part of the code is causing the problem.

To identify and fix problem code...

  1. Narrow down the component (which application on which server) has the problem
  2. Continue narrowing down to determine which package, class, and finally method is causing the problem
  3. Go to the source code to fix it.

You can view response time breakdown data in...


To narrow down the location of the problem

  1. Identify the phases of program execution and identify resource-intensive methods

    The Execution Flow and the Method Invocation views display all the response time breakdown data for the run.

  2. Use UML2 Trace Interaction views.

    Start at the host interactions level and drill down to process interactions, thread interactions, class interactions, and possibly object interactions.

    To open the host interactions view:

    1. Select the monitor object.

    2. From the monitor object pop-up menu, select...

        Open With | UML 2 Host Interactions

    3. Ensure the Distributed Layout is selected for the Profiling Monitor view.

    Look for "hot spots" indicated by a red spot on the Time Compression bar on the left-hand side of the sequence diagram. These indicate major delays or errors associated with events such as method calls. Note these problematic sections of code.

  3. Use the Execution Statistics view

    With the statistical tables, you can see which package, classes, or methods are taking the most time. Examine areas that were highlighted as problematic in the sequence diagram, and note the problems highlighted in the statistical tables.

  4. Examine the source code.

    Once you have used the profiling tools to narrow down where the problem is, use the source views and editors to manually examine the sections of code highlighted by those other methods, to determine what is wrong with the code.


Related

  • Problem analysis overview
  • Common application performance problems
  • Customize real-time profiling settings
  • Import a log file
  • Analyze log files
  • Use profiling views to analyze data
  • View performance bottlenecks
  • Use the Profiling Monitor view