Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Can build settings slow things down? — Gideros Forum

Can build settings slow things down?

petecpetec Member
edited March 2012 in Bugs and issues
I've got a slight problem with an app I'm working on when I try it on an Archos 70 tablet. The app runs reasonably smoothly when I use the Gideros player on the Archos but, once I have built it and installed it, it then becomes quite stuttery, almost as if the frame rate has dropped, so physics objects move not as smoothly.

I'm new to using eclipse to build apps (having used Corona before) and I'm wondering if I have missed some settings. I'm using Android SDK 4.0.3 and the latest build of Gideros.

For info: The same build runs well on a Nexus One and not too badly on an ZTE Blade (which is much lower spec than the Archos), so it could be something to do with the Archos (although basically the same app runs OK on the Archos when built with Corona).

Thanks
Pete

Update: It seems as if it could be the Archos that I tested it on. Got someone else to try it on theirs and he says it ran very smoothly. Don't know why that should be, other than the one I tried is a very early one and his is much later so maybe they sorted out a glitch in the hardware?

Comments

  • atilimatilim Maintainer
    edited March 2012
    Hi,

    I've also done some tests but couldn't catch a clue (checked the .so files and configurations). In fact, player and exported application are almost same. The only difference is file operations: player loads from the sdcard, but exported application loads from inside of the .apk file. But this also shouldn't make a big difference.

    Can you update this thread if you catch something?
  • It seems to be a GC problem. What is your GC tactic? Are you collecting at every frame?
    Do you create and release a lot of objects at all times?
  • petecpetec Member
    Ooh, I'm all a bit new to this! By GC I'm guessing you mean garbage collecting? If so, I have no tactic. Should I be doing something? I am using scene manager and removing any enter_frame listeners before exiting a scene. Do I need to clear other things manually?

    In case it helps, the problem is most noticeable in two situations:
    1) When I create a few objects (no more than 10) and tween them one after the other in quickish succession so that some are moving at the same time and play sounds when they 'land'.
    2) When simply moving a single ball using physics, giving it a slight impulse when it collides with a block. The movement is smooth using the player but jumpy using the app.

    I may appear a bit rude if anyone replies as I'm travelling all day tomorrow so won't access the forum until late on.

    Thanks
    Pete
  • MikeHartMikeHart Guru
    edited March 2012
    Android by nature has a more aggressive GC than IOS. What I do is to collect garbadge in every frame. All there is. I do it with a simple call to
    collectgarbage()
    In general it is better to predefine objects hide them and let them become active when you need them.
  • atilimatilim Maintainer
    edited March 2012
    @MikeHart I think calling collectgarbage() at every frame can decrease the performance. I can recommend incremental GC by calling collectgarbage("step")

    @petec, If you aren't doing already, maybe you can load all the sounds at the beginning by calling Sound.new() then play them inside you game by calling Sound:play(). (have a good trip :) )
  • @Atilim, sure it will cost you 2-3 fps. But I am fine with that. I rather collect a small amount, which don't take long than bigger amounts.
  • petecpetec Member
    Thanks Mike and Atilim

    I do generally predifine objects and hide them when I can but in a few of the things I'm doing both the object and the number of them depends on what the user touches, so then it's easier to produce them on the fly. I have also been loading all sounds at the beginning, but thanks for the reminder.

    I'm beginning to think that it must be an Archos 70 problem as I noticed that some background music that was meant to loop using backgroundSnd:play(0,1000000) only played once and then stopped. Loops OK on everything else I've tried it on (including a later Archos 80), so I think the Archos 70 must be a bit odd??

    Anyway, I'll have a go at collecting garbage and see if it makes any difference.

    Once again, many thanks for the help. This is a great forum and so supportive.

    Pete
Sign In or Register to comment.