So our company mobile game project has hit a major performance issue. We are suffering performance waves after a specific scene transition. And this wave persists through the rest of the application life time.
I’ll start with by breaking down our scene flow
- Splash Login
- Main Menu
- Battle
- Main Menu
… rinse and repeat.
Our performance for going to the MainMenu the first time is fine. Not great. But it’s 55 fps+.
Once we go into the Battle our performance drops a lot when larger parts of the UI are open.
Once we go back to the MainMenu our FPS is 30fps.
And when we back in the battle our performance gameplay is even worse.
For the rest of the application’s life time this performance drop remains.
This issue occurred last week, apx a week after we migrated from Unity 5.40f3 to 5.5. Our first builds after 5.5 were fine. No performance problems. We have no notable features added, just mostly cleaning. ANd with the few small new features that were added we disabled them.
So going into our profiler we found that our main menu was acceptable for now, but our main menu was horrifying after the battle.
Here is is a snap shots of our Main Menu running on a Nexus 4 Android Phone. As can been seen mostly in the 60fps.
However once the battle is over we show a small UI in the Battle that informs you your rewards. The performance lowers. But there is little UI in the battle scene so this is barely acceptable. But once going back to the MainMenu this is the new snap shop of the profiler. As one can see the performance is down to around 30, and performance hits are in these waves.
In DeepProfiling the biggest cause seems to be “Unaccounted time between: LateBehaviourUpdate and CanvasRenderer.SyncTransform”. In the non deep profiling this called Canvas.SendWillRenderCanvases.