[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] 99 CPU use?
Ricardo Jamin wrote:
I have problem just like you,as in using pygame for non gaming apps and 
the problem of pygame sucking cpu power even during idle.
If your application is idle (stuff like image viewers) you want to use 
pygame.event.wait() to get events from the queue. When there are no 
events your application will be put to sleep and consume no cpu.
When using the event.wait() your application will usually use 0% cpu. If 
you start doing a lot of mouse activity in the window you may register 
some percentages. If you aren't interested in MOUSEMOTION events you can 
block them from the queue and your app will probably never even register 
on the CPU chart.