This thread will cover serious performance bugs that are present from Unity 2017, some are introduced in later versions of Unity, and have not been fixed to this day.
We are currently focused on iOS but there is a high possibility that these same issues are present on other platforms.
Doubled CPU usage
One issue which we noticed is double CPU usage that happens around 150 frames after the scene is loaded or the game app is resumed on some Unity versions and some mobile devices, depending on if fps is locked to 30 or 60fps. For example, you start a game and after the level is loaded you have for the first 150 frames a stable CPU usage of 5ms, after that CPU usage increases to 10ms and stays at that. If you minimize your game and get back into it, this behavior will be reproduced again. This issue often triggers other issues, like jittering in Unity 2017 and 2018, spikes, and unstable fps.
Example:
More examples sorted by Unity version, device, and fps (CPU in the title):
We would like to get an explanation about this and make a bug report if necessary.
Jittering
Jittering is a constant screen tear that happens only when the game is locked to stable 30 fps on Unity 2017.4.32 and Unity 2018.4.31 (the game behaves as it is locked to 10-15fps). This could be some issue related to multithread rendering because we noticed that the same happens on Android when multithread rendering is turned on, once it is turned off jittering does not happen. Changing this setting on iOS does not have any effect. Jittering is closely tied to the above issue with double CPU usage because it always starts when there is a double CPU usage and the game is locked to 30fps. If you minimize and resume the game back, you will again get smooth 150 frames, and after that jittering starts again.
The jittering issue was not reproduced in Unity 2019 and later versions.
We didn’t make a bug report because Unity 2017 is unsupported and Unity 2018 is at the end of the life cycle, without fixing the issue below there is no point in fixing it.
Physics.Processing spikes
The biggest problem currently is Physics.Processing spikes and higher physics CPU load which is a regression from Unity 2017. This issue did not exist in Unity 2017 and it first started to appear in Unity 2018 and it is present also in Unity 2019, 2020 and possibly 2021. This issue appears on many devices, in our case on iPhone 5s, iPhone 6s, and many other devices by user reports on the old issue tracker linked below. It is a huge performance problem, especially on weaker devices like iPhone 5s and iPads with higher resolutions. We could ignore iPhone 5s device because it is old and not many people still use it, however, this device shows that there are some serious problems that will be even more noticeable on iPads that have higher resolutions. Physics.Processing spikes on weaker devices (and maybe on specific higher-end devices) causes very unstable fps, even if you can handle 60fps, spikes will drop it and will cause stuttery gameplay, if you lock it to 30fps, spikes will anyway drop fps below 30fps what will again cause stuttery gameplay.
Example:
More examples sorted by Unity version, device, and fps:
This issue is reported and it is active, but it took 2 months to get any confirmation, and it does not like it is gonna be fixed any time sooner as it should have been:
Other reports related to this:
Rendering spikes
Rendering spikes are introduced in Unity 2019 and they consist of huge Terrain.Details.Render spikes (up to 450ms), Camera.Render Drawing and Camera.Render Culling spikes (up to 150ms).
Terrain.Details.Render spikes can be reproduced every time, on every device on the same point in the sample level and they literally freeze the game, we even experienced a freeze of 1-2sec.
Drawing and Culling spikes are a bit random, but they appear few times in sample level on iPhone 5s, possibly on other devices, but not on iPhone 6s.
Example:
More examples are provided in the bug report and: 95.7 MB folder on MEGA
This issue is reported under id 1312223 and it is still not processed.
Overall performance
We also noticed worse performance in Unity 2019.4.18 than in Unity 2017.4.32 or Unity 2018.4.31 which is more obvious when the device heats up. While we had almost stable fps in Unity 2017 and 2018, in 2019 we get higher fps drops which cause more unstable fps and therefore more stuttery gameplay.
Proofs with a timeline of events and performance status
Here is a detailed timeline of events and performance status which are described above and it is sorted by Unity version, device, and fps lock. To get a clearer view of it c/p it into notepad and stretch it to get lines, go through it and compare with profiler screenshots on:
2017.4.32
iPhone 5s - 30fps
stable fps, no jitter, no spikes, after ~150frames double CPU usage, stable fps, jittering, rare physics spikes, no rendering spikes
iPhone 5s - 60fps
stable fps, no jitter, no spikes, after ~150frames there is NO double CPU usage, stable fps, no jitter, no physics spikes, no rendering spikes
iPhone 6s - 30fps
stable fps, no jitter, no spikes, after ~150frames double CPU usage, stable fps, jittering, rare medium (6ms) physics spikes, no rendering spikes
iPhone 6s - 60fps
stable fps, no jitter, no spikes, after ~150frames double CPU usage, stable fps, no jitter, no physics spikes, no rendering spikes
2018.4.31
iPhone 5s - 30fps
stable fps, no jitter, no spikes but constant huge physics CPU usage, after ~150frames slightly higher physics CPU usage, unstable fps, jittering, constant huge (20ms) physics spikes, no rendering spikes
iPhone 5s - 60fps
stable fps, no jitter, constant big (10ms) physics spikes, after ~150frames there is NO double CPU usage, stable fps, no jitter, constant big (10ms) physics spikes, no rendering spikes
iPhone 6s - 30fps
stable fps, no jitter, small (5ms) physics spikes, after ~150frames double CPU usage, stable fps, jittering, huge (16ms) physics spikes, no rendering spikes
iPhone 6s - 60fps
stable fps, no jitter, small (5ms) physics spikes, after ~150frames there is NO double CPU usage, stable fps, no jitter, medium (5-10ms) physics spikes, no rendering spikes
2019.4.18
iPhone 5s - 30fps
stable fps, no jitter, small physics spikes, after ~150frames double CPU usage, very unstable fps, no jitter, constant huge (17-33ms) physics spikes, often huge rendering spikes
iPhone 5s - 60fps
stable fps, no jitter, no spikes, after ~150frames there is NO double CPU usage, very unstable fps, no jitter, often big (6-17ms) physics spikes, often huge rendering spikes
iPhone 6s - 30fps
stable fps, no jitter, no spikes, after ~150frames double CPU usage, stable fps, no jitter, rare medium (5ms) physics spikes, rendering spikes
iPhone 6s - 60fps
stable fps, no jitter, no spikes, after ~150frames double CPU usage, stable fps, no jitter, often medium (7ms) physics spikes, rendering spikes
2020.2.2
Roughly the same as on Unity 2019.4.18.
The current state of development with Unity
At this moment every Unity version has its own performance problems, the latest Unity version seems to have even more performance issues than older versions. We always try to deliver an optimized version of our products but this becomes more and more difficult.
Unity 2017 – unsupported, jittering on 30fps
Unity 2018 – jittering on 30 fps, physics.processing spikes, unstable fps
Unity 2019 – physics.processing spikes, rendering spikes, slightly worse performance, unstable fps
How we clearly see that Unity has serious problems that are dragged from version to version and even became worse now than before. We would like to get the following explanations and answers:
- Physics.Processing regression is introduced in Unity 2018 and it is still not fixed. How long will it take to fix this serious performance issue in Unity 2018, 2019, and 2020?
- Why we sometimes (depending on Unity version or device version and fps) have double CPU usage after some amount of frames (in our case 100-200 frames)?
- How long will it take to fix Rendering spikes regression which literally freezes the game?
If needed we can provide a sample project for Unity 2017.4.32, Unity 2018.4.31 is provided over bug report, and from that project, you can easily transfer to Unity 2019 and Unity 2020.
We are open to any questions that could help in solving these issues.