Author Topic: NGUI 3.x.x Android Perfomance and Memory Issues  (Read 1948 times)


  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
NGUI 3.x.x Android Perfomance and Memory Issues
« on: September 25, 2014, 05:26:47 AM »
hi guys
this thread is the second part of this thread:, but now I have upgraded to NGUI 3.x.x version, but still have the same trouble.

I have done all the GUI, but as targetted on Android App, I am facing that it lags too much,
I have studied on these forums and I have applied all the techniques came under my eyes, like Panel.static, Panel.cull.
As a large GUI, I have Profiled to see more precise details and i found that
Textures: 0.56 GB,
I deleted the NGUI and pressed Play and then there was only
Textures: 176 MB.

About 300 MB are took by NGUI, when I have only 4-5 Atlases, all lesser then 512x512 and the last 2048x2048 (16 MBytes).
My atlas textures does not pass 25 MB if we want to Floor the value.

Seeing this I tried to break my GUI into several Prefabs, Instantiate and destroy them as I need, using a Loading Screen, but it didnt helped me because the Profiler is still saying exactly the same value.

So this cause the app to close (crash due to memory issue) after few minutes of use, and the application is countinuesly lagging while also not using, only stopped, no gui movement, or anything.

Another thing i tried to do is that as I saw that modifying Panel.MAlpha with Animation to move from one screen to another was heavy. I have replaced the animation with just movement, but it is still heavy.
At last I have also modified UIButton and UIButtonColor, making comment the codelines which was doing Hover and Active.
But not enough change made this optimization passes.

I have tried to build the app without GUI, and it is extremely fast to load, no lag, no memory crash.
Then i have build the app only with GUI, nothing more, long load, it was lagging, and after few time crashing.
I tried to see the profile with all the gui screens in the scene and it was around 0.54 GB, and i tried to remove all, and put only one Loading scren which has 3 Label, 2 UISprites and 10 UISprites (used in progressbar) and only this little gui was 0.54 GB,
Then i have tried to delete all UI gameobjects by step by step, and Resources.UnloadUnusedAsset (). But untill the last UI_____ script on any gameobject it was heavy,
I have deleted also the camera with UICamera and only then I got the Memory to 156 MB.
so what i got is that just having a NGUI component it loads all theese textures inthe memory.

I don't know what to do, hope some one can help.


  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 180
    • View Profile
Re: NGUI 3.x.x Android Perfomance and Memory Issues
« Reply #1 on: September 25, 2014, 10:47:08 AM »
what is the "Detailed View" in memory area the profiler? it shows all data in the memory.


  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI 3.x.x Android Perfomance and Memory Issues
« Reply #2 on: September 25, 2014, 07:44:51 PM »
Half a gig of memory? What do you have in there, full-screen textures?