Issue 258: Consuming less cpu usage
Status:  Done
Owner:
Closed:  Jul 2010
Reported by bernt.hu...@googlemail.com, Jun 2, 2010
On my PC (Intel(R) Pentium(R) 4 CPU 3.00GHz with 3GB ram) under ubuntu lucid
pymt apps like wang use nearly 100 or over 100% cpu. (as I can see with top)

I know that top is not a high precision measurement  device, but it gives
clear hints.

Looking at solarwolf, a python game, I see that it is possible to get a
framerate of 40 fps with only 20..35% cpu usage.

So we should try to get pymt using only 50% cpu ...
Jun 2, 2010
#1 bernt.hu...@googlemail.com
In win_pygame.py changing
........................................
        while not evloop.quit:
            try:
                self._mainloop()
            except BaseException, inst:
........................................
to
........................................
        while not evloop.quit:
            try:
                self._mainloop()
                if not pygame.display.get_active():
                    pygame.time.wait(100)

            except BaseException, inst:
........................................

seems to do the trick
(at least it seems so)
Jul 7, 2010
Project Member #4 txprog
already merged
Status: Done
Labels: Priority-Low Type-Enhancement Milestone-0.5