Extremely low FPS, what profiling application should I use to find performance issues?

自古美人都是妖i 提交于 2019-12-05 12:37:23
Jeff_Hd

Have you tried using SlimTune?

You could also use StopWatch to measure sections manually.

Okay, let me bring my personal experience with game development in XNA.

The first thing you need to do is go into Debug -> Start Performance Analysis. This profiles your CPU activity and see's what threads are in use and what is doing the most processing.

You also need to factor in a couple of more things:

-You are probably running in debug mode, this means that some of your CPU is being dedicated to VS and to check for exceptions and what not.

-Your code might be inefficient. I recommend trying to limit the amount of Lists, Arrays, ADT's, and objects created during run time, because that slows it down a lot. Last time I checked the Game Loop ran 60 times a second so that imagine what a strain it would be to allocate a new List, then garbage collect it, 60 times a second. It starts adding up.

-I don't know how advanced you are, but read up on parallel threading, or multitasking. An example would to have your physics engine 1 frames behind your graphics update.

EDIT: I realized you found your mistake but I hope this post can help others.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!