2

I've inhereted a multi-threaded Java web app and been tasked with speeding it up. I tried figuring out which parts are responsible for the performance problems by adding logging statements, but this isn't working out.

So, I'm now looking for a tool (a profiler I guess), than can help me to find the code that's responsible for the performance problems. Ideally I'd like to be able to to start the app, execute a few actions, then look a report that shows me where the execution time was spent by class/method.

Due to budgeting constraints, I'm only likely to be able to use free tools, or tools that offer a trial period.

Dónal
  • 185,044
  • 174
  • 569
  • 824
  • 1
    Sounds like an invitation for a lot of unsubstantiated opinions on which is the best (already seeing that in the answers/comments) :) Anyway, this might be useful: http://stackoverflow.com/questions/14762/please-recommend-a-java-profiler – ArjunShankar May 15 '12 at 13:31
  • *[Simple is best.](http://stackoverflow.com/a/317160/23771)* – Mike Dunlavey May 15 '12 at 16:24

4 Answers4

6

For simple evaluations I really like jvisualvm which is shipped with the jdk.

I simply profile the CPU and look at methods, that take the most time.

enter image description here

Screenshot is from the jvisualvm page.

oers
  • 18,436
  • 13
  • 66
  • 75
2

Netbeans has profile support it's free.

Davide Consonni
  • 2,094
  • 26
  • 27
0

jvisualvm will be able to give you an indication where object creation bottlenecks take place - you may be able to do timing profiling with it as well.

it's distributed as part of the modern VM.

mcfinnigan
  • 11,442
  • 35
  • 28
0

VisualVM is free and open source.

http://visualvm.java.net/

evanwong
  • 5,054
  • 3
  • 31
  • 44