2D Game for Android phone performance drop all of a sudden

Hello,

basically I have a simple 2D platformer game with only one level and approximately 400 simple objects on the scene. Have a main menu, game over screen menu and pause menu, all of which are on the same scene. I am simply hiding them and using the singleton pattern for such purpose. Anyway, it was okay until recently, the performance dropped from 16-17 ms to 20-25ms and the game on my phone started to run stuttering, jittering, laggy… not sure what is the right expression, what I mean is not smooth. The interesting part is that it is not starting from the beginning, but after playing a few minutes. I have tried many things, deleting objects, deleting Canvas elements, deleting scripts that I thought might cause the issue (I deleted all singleton connected scripts), tried a few scenarios from build settings, tried some changes from player setting… it is literally with no effect at all. It seems to me that such simple game with ONLY 1 level to have performance issues is a madness.

From profiling the game I have come to the conclusion that my game is GPU bound, but even when this jittering starts it seems that all processes increase proportionally. Will appreciate some help here since I hit the rock bottom and please find attached some pictures from the profiler.





TLDR: you’re running at 60 FPS, which likely leads to overheating quickly. The device downclocks the CPU and the GPU to compensate.