11

I am reviewing a big java application to see if there are any performance bottlenecks. The real problem is that I cannot pinpoint the performance issues to any single module. The whole application is slow as such.

Is there some tool/technique I can use to help me out in this?

6 Answers 6

8

Try using a profiler on your running code. It should help you identify the bottlenecks. Try jprofiler or Netbeans profiler

6

I'm often happy enough using Java -Xprof. This gives you a sorted list of the functions your code spends most of its time in.

3

If you are running on Java 6 you can use the supplied monitoring tools

0

For testing/development purposes, you can download Oracle JRockit Mission Control for free from this site. (Requires Login, but accounts can be set up with any email adress)

Docs Here. It will allow you to find hotspots, memory leaks and much more.

0

As we see from How can I profile C++ code running in Linux?, the most statistically significant approach is to use a stack profiler.

Well, Java runs in the JVM, so getting a stack useful for C code won't be useful for us (it'll get the JVM stuff, not your code). Fortunately, Java has jstack! http://docs.oracle.com/javase/1.5.0/docs/tooldocs/share/jstack.html

It'll give you a bunch of threads, like the GarbageCollector. Don't worry about those, just look at where your threads are.

0

YourKit is a excelent java profiler (not free).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.