- Home /
Profiling a really slow android app
I am creating an app that is all UGUI. I am trying to figure out why it is running so slowly on iOS and Android. I can't seem to attach the profiler to my iOS, but I can attach to Android, so I will ask about that.
The device is an LG Tablet running Android 5.01.
I assume the way to know what is killing performance is to see what is taking the most time in the profiler.
The thing that is at the top of the list most of the time is this:
Graphics.PresentAndSync - 48.5% 160.53ms |__Device.Present - 48.5% - 160.52ms |__Present.BlitToCurrentFB - 0.4% - 1.32ms |__Present.SecondarySurfaces - 0.0% - 0.15ms
So that is taking 160.52ms and yet the child items are taking hardly any time at all.
Can someone explain this to me? If that isn't what is really taking all the processing, then what is?
Some of the other things taking time are:
WaitForJobGroup - 21.7% - 71.75ms |__Canvas.SplitInstructionsJob - 0.3% - 1.26ms
Again, the parent is a long time, but the only child is very short.
Unaccounted time between: Physics.UpdateCloth and CanvasRenderer.SyncWorldRect - 12.2% - 40.38ms
PutGeometryJobFence - 10.3% - 34.27ms |__WaitForJobGroup - 9.3% - 30.83ms
Camera-Render - 3.4% - 11.36ms |__Drawing - 3.1% - 10.27ms
I have deep profiling turned on, so I should be seeing all children, right?
What else can I do?
How do I get better performance?
Can you show a screenshot of the stats window from the game view when running the performance critical portion of the game in editor? Did you pack the your sprites? Is the hierarchy structure large and you're modifying rects a lot?
There are not a lot of sprites on the screen.
There is a pretty good hierarchy. I have about 15 copies each of 2 different UI panels (30 total). On those panels are 60 "LEDs". They are just UI Image objects with a white circle PNG file that I tint with a color value.
So there are hundreds of these "LEDs". I suspect is has something to do with this, but can't figure out what to do about it.
This is totally a UI based app. No 3D objects.
Stats window from editor. Note that it runs great in the editor, only slow on Android and iOS.
https://drive.google.com/open?id=0B3P6IntD-$$anonymous$$kaclE3Tms4YW5veVE
Everything seems to indicate that the app is cpu bound. I just can't tell from the profiler what code is causing it.
Your answer
Follow this Question
Related Questions
What could be causing my super low performance on my Android tablet? 3 Answers
Spikes with Physics.Simulate() in empty scene? 0 Answers
Profiler Alpha Mobile 0 Answers
Unity 2019.3 LWRP strange Performance Issue on android 0 Answers
RenderTexture.SetActive causing performance issue. android profiler 1 Answer