This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
ratses

Any suggestion to optimize for mobile ?

Question

Hi :) !

I'm currently creating some kind of social networking app for mlobile. Everything is working fine except when loading something from the database (using WWW).

When I load something from it I'm getting some kind of spike of CPU... The problem is that for this kind of app, I really need to load a lot from the database.

Does anyone have any tips to optimize the way I could get infos from the database ?

 

I'm currently doing something like this to get infos from the database :

 

Please login or register to see this code.

Here's the profiler ScreenShot (for example when I load photos) :

Please login or register to see this attachment.

Share this post


Link to post
Share on other sites

3 answers to this question

  • 0

Well !

I found that I needed to use that (here : Please login or register to see this link. ):

 

Please login or register to see this code.

Now in the editor, I get a constant 40 mb memory usage. The problem is that when I try the app on iOS, it crashes after a bit of using. Saying crash due to memory usage (and the iOS profiler tell me it's using more than 300mb of memory...) On android, everything is working fine as well as in the editor. I have no idea what could cause this leak on iOS... If anyone have ever experienced something like that, it would be really helpful to share with me !

 

If that could help, Unity is crashing only at the end of the iOS build (for Android it is working fine), in xCode, I get more than 300 warnings but the app builds and works...

 

Thanks !

Edited by ratses

Share this post


Link to post
Share on other sites
  • 0

Please login or register to see this link.

 

This may help

Share this post


Link to post
Share on other sites
  • 0

Nope ! It still doesn't dispose the www properly. It is just happening on iOS so I searched how I could fix it for now and found this topic: Please login or register to see this link.

Saying that adding : [delegate.data release];
in : UnityDestroyWWWConnection(void* connection) in Please login or register to see this link.

could fix the issue, but the problem is WWWConnection.mm is now using ARC and doesn't allow to do this anymore.

 

Thanks for the answer !

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now