PStat profiling, Huge "Wait:Flip:End" time


When I run pstats with my Panda application, I see a frame time graph that looks like this:

Apparently the “Wait:Frame:End” time is eating up a large chunk of the frame time. A related post on this forum ([url]PStats: Flip begin]) discusses a similar scenario where the “Wait:Frame:Begin” time is large, but the suggestions there do not help. I have the following options set in the config file:

gl-force-no-error 1
state-cache 1
uniquify-states 1
color-scale-via-lighting 1
sync-video 0
yield-timeslice 0
client-sleep 0
multi-sleep 0

I peeked into the Panda source to see what exactly goes on when the “Wait:Frame:End” counter is tracking performance and all I see is a single call to window->end_flip(). The end_flip() function looks like it only sets a flip_ready flag, so I do not understand how code associated with the “Wait:Frame:End” counter could possibly be taking so long to execute.

Any suggestions on what might be going on or how to debug the performance problem further would be very helpful. Thank you!

That looks like vsync is enabled, especially because of the fact that I see 15 Hz in one screen and 30 in the others. Sometimes, even though Panda requests the driver not to enable vsync, the driver ignores it and enables it anyway. Do you have some kind of driver control panel where you can override vsync and forcibly disable it?