Having implemented a resource heavy addition to my game project, I have started encountering frequent stutters in my debugger FP, as I test it. FlashDevelop’s profiler does not seem to hint me towards the problem, no counters are rising as rapidly as required for frequent GCs, the only counter that does is number of shots, but that one wasn’t causing anything bad before. So it seems that I need another profiler tool, that might help me find out what went wrong and where.
The added code does this: one additional vector is stored per tower, single-target tower has its length at 1, all-targetting tower the same (it anyway fires at whole target list, which was implemented before and worked satisfiably), and multiple-targetting tower have this vector’s length at max targets, and in case target list is larger, the code selects “max targets” monsters out of there, and places references in already allocated array. Once there are no targets for the tower, the code clears the now-unused array via filling it with nulls. Nothing more.
I wonder, if there is a profiler that would show me the result(s) of GC, how often does it get called, also what methods are called most often.