1

I've inherited a problem from a programmer that isn't with our group anymore - a piece of our application suffers from performance issues under a particular set of circumstances.

I can replicate these circumstances - however, I don't actually know what is causing this performance issue. I suspect it is a large Java object taking up too much memory at once and causing our front-end to lag, but I can't determine which object it might be.

Since I know what functionality is causing the issue, but not the exact location of the performance issue, is there any way to test this performance and narrow my search down by class and function?

gnat
  • 21,442
  • 29
  • 112
  • 288
Zibbobz
  • 1,522
  • 3
  • 13
  • 20
  • 2
    [How to see what parts of your java code are run most often?](http://programmers.stackexchange.com/questions/207819/how-to-see-what-parts-of-your-java-code-are-run-most-often) – gnat Jan 14 '16 at 14:21
  • 1
    @gnat Yup, that'd be it. Sneaky synonyms... – Zibbobz Jan 14 '16 at 14:22
  • 1
    @Zibbobz one of the most useful things for finding these synonyms is to add all the relevant tags, put the question title in and check the suggested duplicates that show up when asking a question (yes, this involves going to the bottom, back to the top and then looking in the middle). The system duplicate search, when hinted by the tags can provide good matches - they are what feed the 'Related' on the side, and now that gnat added that in - there are *many* relevant questions over there. –  Jan 14 '16 at 14:38
  • @MichaelT That would be what I'd usually do, except our browser won't bring up those suggested/related questions, and tag previews don't work at all. I could wait until I'm on a different computer, but frankly if I want to know how to performance test my code, I'm not going to wait until I get home to post a question. – Zibbobz Jan 14 '16 at 17:57
  • 1
    @Zibbobz: What to do: Run it under a debugger, and in the execution phase where it is sluggish, manually interrupt it and examine the call stack. If you do this a few times, it will [*show you what the problem is*](http://stackoverflow.com/a/378024/23771). Problems with that duplicate question: Knowing which routines have the highest execution count does not reveal the problem. See point 6 [*here*](http://stackoverflow.com/a/1779343/23771). Don't assume it's a matter of narrowing down to class and function. Look instead for what it's doing and why. – Mike Dunlavey Jan 16 '16 at 20:39

0 Answers0