The question really is in the heading, but i have been using the visual studio profiler to optmisie my game, i have noticed that the game.run method is eating through 93.6% of the overall game resources. Is this because all of the other functions are called by it in the game? or is there a problem. I am quite new to the vs profiler and have in the past not used such applications to assist in optimizing.

|
|
|||
|
|
|
Xna probably calls Present in it's body and this is just tells you that the application hangs 96% of the time waiting for the vertical sync -> doing nothing. The task manager should report a low cpu usage too. It does not look like any optimization is necessary yet, at least not on the machine you are running it on. Deactivating vsync should shift it to the Update/Draw functions. Question though is there any game performance advantage having the Vsync On? Vsync off basically leads to frames getting rendered that will not be displayed at all, as the display only updates in a fixed interval, most commonly 60hz. This wastes processing power/electricity and leads to presents getting issued while the display is receiving the last image which leads to an effect commonly known as tearing. On the other side activated vsync leads to an increased input latency of up to 1/fps seconds, which is very notable in some games, eg ego shooters, when using absolute input devices like a mouse or head tracking. |
|||||||||||||||
|
