Easy to Learn Java: Programming Articles, Examples and Tips

Start with Java in a few days with Java Lessons or Lectures

Home

Code Examples

Java Tools

More Java Tools!

Java Forum

All Java Tips

Books

Submit News
Search the site here...
Search...
 
Search the JavaFAQ.nu
1000 Java Tips ebook

1000 Java Tips - Click here for the high resolution copy!1000 Java Tips - Click here for the high resolution copy!

Java Screensaver, take it here

Free "1000 Java Tips" eBook is here! It is huge collection of big and small Java programming articles and tips. Please take your copy here.

Take your copy of free "Java Technology Screensaver"!.

How to improve performance?

JavaFAQ Home » Java Installation, tunning, options... Go to all tips in Java Installation, tunning, options...


Bookmark and Share

One way to improve performance is with performance analysis. Performance analysis is looking at program execution to pinpoint where bottlenecks or other performance problems such as memory leaks might occur. Once you know where potential touble spots are, you can change your code to remove or reduce their impact.

  • Profiling
  • Analyze a Program
  • Operating System Performance Tools

Profiling

The Java Virtual Machines (VMs) have had the ability to provide simple profile reports since Java Development Kit (JDK) 1.0.2. However, the information they provided was limited to a sorted list of method calls a program had called.

The Java® 2 platform software provides much better profiling capabilities than previously available and analysis of this generated data has been made easier by the emergence of a Heap Analysis Tool (HAT). The heap analysis tool, as its name implies, lets you analyze profile reports of the heap. The heap is a block of memory the Java VM uses when it is running. The heap analysis tool lets you generate reports on objects that were used to run your application. Not only can you get a listing of the most frequently called methods and the memory used in calling those methods, but you can also track down memory leaks. Memory leaks can have a significant impact on performance.

Download the Heap Analysis tool:

Analyze a Program

To analyze the TableExample3 program included in the demo/jfc/Table directory in the Java 2 platform download, you need to generate a profile report. The simplest report to generate is a text profile. To generate a text profile, run the application with the -Xhprof parameter. In the final release of the Java 2 platform software, this option was renamed -Xrunhprof. To see a list of the currently available options run the command

java -Xrunhprof:help
Hprof usage: -Xrunhprof[:help]|[
Full text here

 Printer Friendly Page  Printer Friendly Page
 Send to a Friend  Send to a Friend

.. Bookmark and Share

Search here again if you need more info!
Custom Search



Home Code Examples Java Forum All Java Tips Books Submit News, Code... Search... Offshore Software Tech Doodling

RSS feed Java FAQ RSS feed Java FAQ News     

    RSS feed Java Forums RSS feed Java Forums

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest 1999-2006 by Java FAQs Daily Tips.

Interactive software released under GNU GPL, Code Credits, Privacy Policy