I’m making a 2D Android game and I’m having trouble with overall performance. I’ve been profiling my game in detail, but to be honest, I don’t even know what I’m looking at anymore. I have some screenshots of the profiler…
Note: This game has no audio whatsoever, and it was profiled from an actual Android phone.
I’ve done everything I know to optimize the game, but performance is still a big problem.
The biggest problems I’m having are slow startup times when the game is launched, the game starts to lag over a longer period of gameplay, and I get massive physics spikes after a longer period of gameplay.
I just need some advice to put me back on the right track.
If anyone can help, It would be greatly appreciated…
Hi
Could you try disabling all Profiler Modules you don’t need, especially the Audio Profiler Module, and see if that helps?
Also, how hot is the phone? Could be thermal throttling taking your game off the CPU for a bit. The Profiler doesn’t know if the time was spend while the thread was on the core or taken off for some reason. E.G. I’d not expect a GC.Alloc to take that long (unless it is triggering a heap expansion and I’d kinda expect a GC.Collect sample then).
In general, if a System like the Audio System takes this long without there being any audio to begin with, I’d say that’s worth a bug report.
In case of the Animation System, it might’Ve been waiting for those Animation Jobs in the Job Threads to finish. As to Why there was such a long Idle time in between, I have no idea other than, maybe the threads were thrown off core between jobs?
You might get more details with a platform specific native profiler that knows more about what processes where on or off core.