Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers 2

up vote 6 down vote accepted

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.

share|improve this answer
    
Thanks! That would help a lot! –  felipedrl Nov 5 '12 at 10:31
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.