Hacker News new | ask | show | jobs
by miahi 5280 days ago
You don't have to know only the tools to use, but to know how to use them. Looking only at histograms only tells you what fills the memory, not how it does it. Exploring the object tree in the heap dump and thread dumps are way more useful.

Last month we used VisualVM to get rid of the OutOfMemory errors and to decrease the run time of an application from >110 hours to 40 hours. We found that a big 3rd party library was keeping some kind of undocumented "undo history" of every action, that could not be flushed.

1 comments

Couldn't agree more. In a garbage collected language, object retention graphs and call stacks are everything when it comes to object lifetime. The garbage collector looks at them to figure out when it's time to clean up an object, so you need to be looking at them if you want to figure out why the GC isn't cleaning up that object.

If those features aren't being used then there's a good chance that the problem is in the chair, not in the profiler.