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

大城市里の小女人 提交于 2019-12-22 06:59:13

问题


I'm creating an XNA game and am getting an unexpected result, extremely low FPS (About 2-12 fps). What program should I use to test performance and track down what is slowing it down?


回答1:


Have you tried using SlimTune?

You could also use StopWatch to measure sections manually.




回答2:


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.



来源:https://stackoverflow.com/questions/9814575/extremely-low-fps-what-profiling-application-should-i-use-to-find-performance-i

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