PStats, perfomance and Wait

Hi!

I have another problem. My app have a low framerate. I run PStats and look at this:

Can you help me? What is the WAIT process or function? And why it get much times?

Thanx

Double-click on the “Wait” category and see how it is broken down.

David

David, it is a Thread block. But I can’t get more information. What is the thread and what it doing?

“thread block” simply means that Panda is waiting for some other thread to run, either within your application or within the operating system. If you did not spawn any other threads within your application (and there aren’t any other threads available in the PStats graph), then it’s just the operating system.

This is normal. Panda sleeps a little bit each frame to allow other processes on your operating system a chance to use some of your CPU; otherwise, your entire PC would be unresponsive and hard to use while you are running a Panda application, even a silly pview window drawing just one blue triangle. In fact, even PStats running on the same computer would stop working well, so you might not get a dynamic update on your PStats window any more. This may effectively limit your frame rate to around 60 fps or so. The good news is that this wait time will go down as your own CPU utilization goes up, so that it doesn’t really impact your frame rate as you start drawing more complex scenes; and there’s not much point in exceeding the video rate of your monitor anyway.

If you want to disable this feature so that you actually use all available CPU and don’t ever yield it until you have to, you can disable it with certain config file settings. The particular settings you need to make vary a bit from one release to the next, try:

sync-video 0
yield-timeslice 0
client-sleep 0
multi-sleep 0

David

David thanks! I will known now.