Just figured out the fps drop in the second app launch. I’m using the old tablet (prestigio multipad 4 ultra quad 8.0 3G) and there are the problem with the fps in the second app launch.
At the first time everything is okay, I’m getting about 30-38fps which is pretty good for such old device but after closing the app and reopening it I’m loosing about 10-15fps. There are no difference between the scenes. Everything is the same but in the second launch fps downs to 20-25 (instead of 30-38).
If I clear the app cache and the data - fps goes back to 30-38, but the relaunch decreasing the fps back to 20-25. Per profile, looks like there some issue with the GPU. Gfx.WaitForPresent appears in the second launch which means that CPU is waiting for GPU (vsync is off, targetframerate = 60).
Unfortunately I’m not able to test it on some other old device (nexus 5x, asus zen phone 3 runs at 60fps so there are no difference).
Tried to test it in the empty project and there are 5-6 fps drop (so looks like it’s not a project-specific problem).
Seems like some sort of ‘active’ vs ‘idle’ mode to me where the phone/device goes into ‘active’ CPU/GPU clocks when you first start the app, but quitting out puts it in ‘idle’ mode which uses lower clocks and causes the lower fps and when you relaunch the app it doesn’t detect that it should be in ‘active’ mode again for some reason.
I tried to restart the tablet and there are no success. It still has a fps drop. So the issue is related to some unity processes. Only cache/data remove or reinstall has no fps drop at the first launch. I’m worried that this issue can affect the all devices. For example it’s not visible on Nexus 5x, but I suppose it would has some hidden performance impacts which lead to throttling.
Could some one verify that issue on any OpenGL ES 2.0 device? Just build any empty project with the default skybox (you can add some plane and severals spheres) and check FPS at the first and at the second launches using that script:
using UnityEngine;
using System.Collections;
public class FPSDisplay : MonoBehaviour
{
float deltaTime = 0.0f;
void Awake()
{
Application.targetFrameRate = 60;
}
void Update()
{
deltaTime += (Time.unscaledDeltaTime - deltaTime) * 0.1f;
}
void OnGUI()
{
int w = Screen.width, h = Screen.height;
GUIStyle style = new GUIStyle();
Rect rect = new Rect(0, 0, w, h * 2 / 50);
style.alignment = TextAnchor.UpperLeft;
style.fontSize = h * 2 / 50;
style.normal.textColor = new Color(1.0f, 1.0f, 0.5f, 1.0f);
float msec = deltaTime * 1000.0f;
float fps = 1.0f / deltaTime;
string text = string.Format("{0:0.0} ms ({1:0.} fps)", msec, fps);
GUI.Label(rect, text, style);
}
}