I'm trying to optimize my PC game but I can find the bottleneck since every time I run it through a profiler (gDEBugger) it runs smooths. When running outside gDEBugger I get these annoying hiccups. It's not just the graphics, the sound also gets choppy. The drops are inconsistent across runs, i.e, sometimes I run the same scenario and get no drops at all, sometimes I get a few drops, and others the game is consistently slow. The only constant is: when running through gDEBugger I ALWAYS get a smooth run.

I'm suspecting something outside my game is interfering and causing these drops, but what in the hell does gDEBugger do that nullifies these drops? A higher process priority? Any ideas?

Thanks in advance.


2 Answers 2


This question might be too general to give an answer that fixes your problem.

Before using profilers I would recommend adding 1) Lots of tracing statements to your program and 2) ability to turn on/off features at runtime (including tracing but also things such as textures, culling, using very simple meshes, etc). I've found doing these 2 makes it much easier to pinpoint performance problems in my games.

That being said, you do have other options depending on your target platform. Since the problem might be environmental and assuming you are targeting Windows (big assumption I know) you might find using xperf valuable.

xperf is a system level profiler that will tell you everything that is happening in your computer and has a low impact on the programs that are running. Bruce Dawson's blog has a lot of very good tutorials and examples (such as finding performance problems in random programs such as Powerpoint or backup drive ). One trick he mentions is having xperf running all the time in a circular buffer so that as soon as you are able to repro the problem you will have a snapshot of everything that was happening in the machine.


Does the same thing happen on other machines or just your dev box? Once I took a break from developing a game and when I came back to it I noticed it was strangely slow, I just updated my graphics driver and it magically sped up, why it was slow in the first place I have no idea.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .