I am very disappointed with the performance of my app and I am not sure how to go about solving this,
here is the screencast of my app in action: (left simulator is corona, right simulator is xcode, let it buffer, it’s quite slow) http://screencast.com/t/2OzMHFfqCj
That screencast it’s not even the final version, there are a bunch of animations that I have to disable to squeeze some FPS out, it already makes the game feel really bland. I am using 20x25 tiles displayed using sprite through Lime version 0.8 and I am getting 30fps using corona simulator but 3-4 fps in both xcode simulator and actual device (after several hours mucking around some provisioning stuff, SO MUCH HATE).
Is it too big? but 5 megabytes shouldn’t be that big? It’s even reporting really low in the actual device’s texture memory.
Is it memory extensive? I have an enterframe, I disabled that and redeploy, i am not getting any performance gain.
I have made sure that I am optimizing my lua, local vs global, table.insert vs #table + 1 for insertion, etc
I am using texturepacker for my png-24 sprites and displaying them using sprite library via SpriteGrabber
What should I do? I need a major help guys…
[import]uid: 11334 topic_id: 4700 reply_id: 304700[/import]
PS: I haven’t even put audio in yet…
( I am still not able to edit the thread, I could but I think I will be moving the thread to either General forum/ Corona SDK forum) [import]uid: 11334 topic_id: 4700 reply_id: 14882[/import]
I have no experience with Lime, however the first thing I would try is to find a way to automatically set everything that goes out of screen to non-visible:
@oz-machine
I am hoping that is the same bug so the next release will fix it, although I doubt that it is the same, I haven’t even put any audio in and it’s already going this slow… [import]uid: 11334 topic_id: 4700 reply_id: 14898[/import]
Well, that’s the thing. It happens whether there’s audio or not. Apparently, a recurring function relating to the audio engine, designed for maintenance, is draining cpu. It’s only noticeable when run on iOS, like the actual simulator or device. Hopefully, it’s a simple fix. [import]uid: 4454 topic_id: 4700 reply_id: 14899[/import]
@oz-machine
ho… thank you for the hint oz-machine, could someone from ansca confirm this? I am willing to send my codebase and everything. [import]uid: 11334 topic_id: 4700 reply_id: 14900[/import]
Hi, I know that Lime itself does cause huge performance problems on the hardware which is the main reason I haven’t actually released it yet however it looks like your problem might be a combination of Lime and the Audio bug. I’m hoping that the performance issues I am having with Lime are caused by something like that Audio bug that we just haven’t discovered yet. [import]uid: 5833 topic_id: 4700 reply_id: 14921[/import]
Well, the other version shows ~5 Mbytes of - presumably - garbage “produced”… while the Corona version shows 0.005-almost-nothing.
Which makes me think the garbage collector is set too aggressively - by either setting it or calling collectgarbage(). (and, no, you should not call collectgarbage() every frame)
BTW, how are you measuring that “used memory” under Corona ? [import]uid: 5750 topic_id: 4700 reply_id: 15035[/import]
Well, if that’s texture memory, that’s extremely weird then. I don’t know “Lime” either (can you post a link ?).
If that’s all due to the audio bug, well, it must be a heck of a nasty bug… otherwise it looks like a continuous free/load of big chunks of graphics the device cannot handle. (hence the “wrong” texture memory reading)
Consider that iPhone 3GS can handle a texture transfer rate of around 1 Mb/frame at 15/20 FPS… but if, in your case, sprite-sheets are being freed and loaded per frame, that could be a reason.
Corona simulator does not emulate the actual device hardware… while XCode simulator does.
Just guessing tho. [import]uid: 5750 topic_id: 4700 reply_id: 15065[/import]