New issue 340 by hsawhney: cpu hog
http://code.google.com/p/pymt/issues/detail?id=340
pymt is very aggressive in updating widgets/display, it should be more of
an evented framework. only update widgets when required
Comment #1 on issue 340 by txprog: cpu hog
http://code.google.com/p/pymt/issues/detail?id=340
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 :)
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)
Sorry, it was : http://pymt.eu/?page=releasenotes-0.5
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?
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
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 :)