Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Code profiling — Gideros Forum

Code profiling

adiposeadipose Member
edited January 2013 in General questions
Is there a way of doing code profiling in Gideros? I badly need the ability to do this.

I have ported my code from an Android project, and have kept nearly the same structure, taking advantage of Gideros class implementation to keep my components the same. At this point the game runs 98% the same as the Java based one, but the performance is abysmal.

Currently I am getting between 5 and 20 fps (it jumps quite a bit), whereas on Java, I was getting 60fps. This is on the Droid 3.

So far I can see that about 40% the time is spent in updating the "physics", and another 40% in placing sprites. Another 20% is unaccounted for, which I assume to be overhead and the actual drawing of the sprite tree.

I can't believe the performance could be this bad in Gideros/Lua, but I don't see anything drastically different from my Java code (perhaps that's part of the problem). I have applied all Lua optimizations that I can think of.

At this point I would like to see if there is a way to isolate what is taking all the time--hence the question about code profiling.

FYI, there are probably anywhere from 30-100 sprites on the screen at a given time, with a few large ones for the background. Does disabling callbacks on these sprites help anything?

Comments

Sign In or Register to comment.