I'm using 5800 XpressMusic and writing some program that uses canvas with pys60
Although its drawing functionality seems very fast, I'm suffering a problem that updating gets slower periodically.
When I first update canvas, it just takes less than 0.01 sec to call e32.ao_yield() but when I update canvas several times in a while respectively, it gets slower and then takes more than 0.1 sec to call e32.ao_yield(). It's too slow for smooth scrolling or games.
Even "ball.py" example provided by nokia or other sources using canvas seem to have same problem,
and examples using gles doesn't seem to have such a problem.
Following is my test problem. It constantly updates canvas and prints time spent in e32.ao_yield().
And output is like following:
import appuifw, e32, graphics, time
if len(dmsg) > 20: del(dmsg)
global img, app1
app1 = appuifw.Canvas(redraw_callback=handle_redraw)
appuifw.app.directional_pad = False
appuifw.app.body = app1
appuifw.app.title = u"Canvas Test v0.0"
appuifw.app.screen = "normal"
appuifw.app.menu = [(u"Exit", quit)]
appuifw.app.exit_key_handler = quit
running = 1
dmsg = 
count = 0
img = graphics.Image.new(size=(app1.size, app1.size))
redraw = True
for i in xrange(0, len(dmsg)):
img.text((1, 20*i), unicode(dmsg[i]), fill=0x000000, font=None)
count = count + 1
# if count % 10 == 0: handle_redraw(())
beginTime = time.time()
endTime = time.time()
dout("count %d duration %.2f" % (count, endTime-beginTime))
Is it problem of pys60? or 5800 XpressMusic? (or Korean version of 5800 XpressMusic) or symbian? or am I using in wrong way?
count 3 duration 0.03
count 4 duration 0.04
count 5 duration 0.05
count 6 duration 0.06
count 7 duration 0.06
count 8 duration 0.07
count 9 duration 0.08
count 10 duration 0.09
count 11 duration 0.10
count 12 duration 0.11
count 13 duration 0.12
count 14 duration 0.15
count 15 duration 0.03
count 16 duration 0.04
count 17 duration 0.05
count 18 duration 0.06
count 19 duration 0.06