performance issues

hey all,

i have a game developed with corona, it works really well on simulator (cuz it has more memory ofcourse :slight_smile: ) but on the device (iphone 4) it is laggy.

i tried to see the memoryusage but i dont know if its too high for an iphone device or not.

in my game every enemy object based on 1 sprite. and the sprite is only 15 kb. these objects has their own collision and sprite eventhandlers. i think the problem is in these functions. but i dont know how can i imporove the code.

so my question is, how can i test my application’s memory usage if its too high or not ?

thnx for all replies.

[import]uid: 38248 topic_id: 15231 reply_id: 315231[/import]

try this, found this months ago, somewhere on this site…

function showGarbage ()  
 collectgarbage()  
 print( "\nMemUsage: " .. collectgarbage("count") )  
 local textMem = system.getInfo( "textureMemoryUsed" ) / 1000000  
 print( "TexMem: " .. textMem )  
end  

-finefin [import]uid: 70635 topic_id: 15231 reply_id: 56300[/import]

i know that but what is the limit ? [import]uid: 38248 topic_id: 15231 reply_id: 56342[/import]

2 second google search…

http://stackoverflow.com/questions/3516190/iphone-how-much-memory-usage-is-too-much

http://stackoverflow.com/questions/3448583/memory-uses-limit-on-iphone

http://stackoverflow.com/questions/457568/iphone-development-memory-limitation-for-iphone-application

etc etc [import]uid: 70635 topic_id: 15231 reply_id: 56356[/import]