App slows down when you minimize window

Looking at igLoop, the task the controls rendering, it slows down a panda app by using time.sleep if the window is minimized. I would think that panda would just not call renderFrame. Is there any reason for this?

You could comment out the call to task.sleep() if you like. But if you do this, the app will consume 100% of the available CPU when the window is minimized, potentially starving out other applications. Since the assumption is that when you minimize the Panda window, you want to give the CPU to other applications for a little while, it makes sense to reduce the amount of time that Panda spends spinning.

Plus, since the app is no longer rendering when the window is minimized–which is usually the largest chunk of the frame time anyway–then the total time spent for each frame will be much reduced, and it may well be that even with task.sleep(), the overall frames per second are higher when the window is minimized than when it is not.

David