I wrote lots of sloppy code, quickly, to get a game up and running fast.
That’s great, worked fine, but now (weeks later) performance has slowed down enough it’s getting annoying, and I’d like to clean things up.
First, obvious, thing: I’m getting GC freeing 1.5 MB per second. That’s a lot bigger than I expected, since I’m only running at 20 FPS.
Eclipse’s DDMS view has an allocation tracker, but the frequent GC’s mean I don’t get to see what’s allocating so extensively.
Any ideas on how to catch this? Or is it just a case of “keep hitting Get Allocations button until you see something unexpected” ?