frame rate drops every seven seconds

I am having an issue across all multiple devices that run my app at various frame rates. What I am seeing is that every 7 seconds the frame rate of my app drops by 50%. For example if it runs at 40 fps on one device it dips to 20 fps there and if it runs at 30 fps on another device it drops to 15 fps there. The timing of the fps drop is very precise and I do not have any timers firing callbacks every 7 seconds so I am baffled. Has anyone seen anything like this before?

*EDIT* The corona simulator does not display this issue. It happens on both android and iOS devices as well as the xcode simulator.

You can try to test it in Xcode and progress log can tell you if something is wrong with your app

I've tried running it in the xcode simulator and see the problem, but no errors print out to the terminal. I'm not sure exactly what you mean by progress log, is there something else I could be checking?

Thanks!

It may not be an error as such but rather you doing a whole lot of stuff at once - how "busy" is your app? (What's the texture and memory usage like?)

Peach :)

I'm using 29mb of texture memory. The game does this even in its idle state. In this state I'm doing the same thing every frame except for every 5 seconds I change a font's text string.

What does your Runtime listener actually do and what devices are you testing on? That's a big drop however if one device is a 3GS I wouldn't be surprised with that texture memory usage. (Safe for 3GS seems to be up to 25MB, no higher.)

Peach :)

The devices that I am testing on are the Galaxy Tab 10.1 and the iPad. The only Runtime listener that I have drives my games update loop on the enterFrame event. I'm using sprite sheets for all of my graphics static or animated. Cutting out assets so that I drop below 20mb of texture memory I still see this issue so I'm not sure that is it. I'm still digging through my stuff to try to find anything that could trigger so precisely timed of an issue.

Thanks for your insight, I know this is not the easy kind of issue to debug with or without the source.

This is a very weird issue, I've never seen it honestly. I suggest you keep digging :(

Just to check, what version of Corona are you using?

We do have premium support ( Link: http://www.anscamobile.com/corona/support/ ) where a member of the team will debug your code and fix issues for you, if you get really stuck.

Sorry I don't have any magical quick fixes!

Peach :)

I'm using build 2011.696 at this point. I'll post if I ever figure out what's causing the issue, but my primary focus at this point is to just boost overall performance up so that the 50% fps hit doesn't have a noticeable effect on the apps operation.

Thanks again!

How are you updating that text string?

views:1876 update:2011/12/28 9:26:54
corona forums © 2003-2011