Java applications: Performance tuning toolsPosted: December 11, 2005
Pet Peeve. On having reached Code Complete, I get around to experimenting with performance optimizations for my application(s). I came around to Java a while ago (circa 2000 from the “C” camp). The “C” developer community has a plethora of professional tools available under various licenses. The set of free tools for “C” are enough to get by on, some even provide additional value. In contrast, looking for Java performance tools has always been frustrating. I have trouble finding even the most basic tools I can use, tools that will give me some insight into whats going on under the hood of my application.
Looking for the profiler. In the past I have used JMechanic with Eclipse. I personally thought it was a very simple plugin to use. It got the job done. The plugin was unable to provide timing statistics but it was able to provide a good heap analysis. Unfortunately, JMechanic was abandoned when Hyades (now known as TPTP) for Eclipse came around. Before trying Hyades, I tried a bunch of profilers. None worked out as intended – they either did not work, or fell short of what is expected.
Act 2: There are no free lunches. Main characters are, Santosh, an intermediate developer as far as Java is concerned. Sarinder, a wisened veteran 😉 of professional java programming.
Santosh: Damn, this memory profiler will list the objects created, but won’t filter them by namespace.Sarinder: Which profiler are you using?
Santosh: This free plugin for eclipse.
Sarinder : Ahh, see that’s your problem right there. It’s free.
First attempt. My current Eclipse install was originally based on Eclipse 3.1M3. Somewhere down the line, I upgraded it to Eclipse 3.1 final release. Why is this relevant? It seems the upgrade had everything to do with what was to come next. Before installing TPTP I walked through their installation guide, downloaded and installed all the pre-requisites for TPTP. Unfortunately, I did not get very far. “Unable to create part: Profiling Monitor”. So frustrating, the message was not even helpful from any possible perspective. I guess thats what happens when you don’t pay attention to exceptional circumstances (see “Grouchy Code”). Wait a minute, I just found another installation guide on the Eclipse home site. It appears I may have missed a few components. Which would mean that the original TPTP documentation isn’t complete. So I go ahead and install the missing components. That doesn’t help either and I am still stuck with the lame error message.
My question is, how do I debug the problem with TPTP in Eclipse and understand where it failed?
Cleaning house. On Day 2, I decided I had to blow away my current Eclipse install and make a fresh attempt at installing Eclipse TPTP features. :P. I hate to do this. But it worked, arggghhh :-). I am no officially in the “try it, see if it fails or works” club that Steve McConnell warns about :-). I now have TPTP working and if I can get anything useful out of it, I will definitely write about it as a matter of record.