Issue 340: cpu hog
Status:  WontFix
Owner: ----
Closed:  Oct 2010
Reported by hsawh...@gmail.com, Oct 4, 2010
pymt is very aggressive in updating widgets/display, it should be more of an evented framework. only update widgets when required
Oct 4, 2010
Project Member #1 txprog
This is kind of impossible, cause of our choice of OpenGL.
Try to enable vsync, or reduce the framerate if 60FPS is too much for you :)
Status: WontFix
Oct 4, 2010
Project Member #2 txprog
Just to be sure, ensure you've your latest graphics drivers installed, if not, you may use CPU for graphics display, and then yes, it can be really slow.

And we are always trying each version to reduce the python overhead, and accelerate some part in C. This is a continuous work, and will never stop :) (check the http://pymt.eu/?page=releasenotes-0.5.1)
Oct 4, 2010
Project Member #3 txprog
Sorry, it was : http://pymt.eu/?page=releasenotes-0.5
Oct 4, 2010
#4 hsawh...@gmail.com
I browsed through the documents and I couldn't figure out a way to restrict fps via configuration or api. 

I had to induce a delay callback by inducing sleep via 

def throttle_cpu():
  def induce_delay(dt):
    time.sleep(delay)
    return True
  getClock().schedule_interval(induce_delay, 0)

but then this would also delay firing of events on the screen which would degrade responsiveness towards touch/mouse inputs and effects

Is there a way to handle this better?
Oct 4, 2010
#5 hsawh...@gmail.com
I really liked pymt but because of cpu hungry nature, its a toll on the battery life of  touch tablets and netbooks. If pymt can get an evented system, it will be a huge win for pymt for devices where battery life is important
Oct 5, 2010
Project Member #6 txprog
Yes, you have no way to control vsync right now. Vsync is by definition sync on the vertical sync of your screen (60 fps most of case.)

For tablet, we already got a discussion like this, and again, our choice of opengl rendering made impossible the fact that we can't draw only the part to update. (because on opengl, you always "flip" the whole screen, no way to flip only a part.)

Our approche will be more if "nothing" happen, stop the loop until a new input is coming. Then, if you're not playing animation or video, pymt will sleep. This is not released yet, and introduce lot of changes inside the toolkit. But it will come :)