Exteremely Low Performance On Startup With Zenfone 5

When I launch the game on Zenfone 5, it starts with 80+ ms in the game thread. Then it decreases to 18 ms in nearly 1 minute.

This occurs in a clean project too. But this doesn’t occur with Epic Citadel and any Unity games.

If I remove the game from memory then immediately and relaunch the game, this time it stars with 25+ ms and decreases to 18 ms again.

Tested phone model is Asus Zenfone 5 A501CG.

OS: Android Lollipop(I don’t remember this problem with UE 4.10 games tested on KitKat)

Chipset: Intel Atom Z2520

CPU: Dual-core 1.2 GHz

GPU: PowerVR SGX544MP2

RAM: 2GB

Energy mode is in ‘High Performance’.

,

Have you tested this out on 4.12 preview 4 yet? Are you working out of 4.11.2? I recall us talking a few months back, and the issue you had with your Zenfone device was resolved with the 4.11 previews. Please provide some logs, additional information and perhaps some screenshots?

Please keep in mind that we do not have a Zenfone 5 available to test on. All testing will be done on a Galaxy S4.

Looking forward to hearing back from you.

Hey ,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you!

Hi ,

I have tested this on 4.11, 4.12.1(github) and 4.12.4 and results are same. I am working on 4.12.1(github) right now, and I made a test with this.

I remember that you helped a lot to solve the Zenfone 5 crash issue a few months ago, I’m sure this problem will be solved too if you are assigned to this issue :slight_smile:

Here are the logs from the first opening, fps starts from 20 and goes up to 41 in 6 minutes: (ue4stats file)

But if I don’t record logs, it goes from 20 fps to 41 fps in 1 minute, as you can see in this video from another first opening: (mp4 file)

If I wait to see 41 fps once, there is no problem at the next openings in half an hour, here is a log file from a second opening, it looks fine: (ue4stats file)

If I reinstall the game and immediately open again or if I keep the phone idle for half an hour, it is still starting with 20 fps. This problem only doesn’t occur if I open the game and wait for a few minutes then immediately reopen the game.

Also you can see sudden drops in the game thread, which decreases fps to 10~ for a moment.

Project name in the logs is NetworkTests but it is a completely clean copy of “Third Person Template”.

Sadly I do not have a Zenfone 5 to test on. I did pull a similar device into testing, which is a Galaxy Tab 3 10.1" (GT-P5200). I then created a new Third Person Template for a mobile device with 2D/3D scalability. I packaged for ETC2. It stays between 43-46 FPS and 22-24 ms.

Is there a specific way you’re setting this project up? Is there another device you can test with?

Thanks!

There is nothing special in the project. Same problem occurs with Unreal Match 3 too.

I can’t reproduce this issue with Epic Citadel or any Unity games.

There isn’t any other slow enough device that I can test this with. But I will test this on another Asus phones as soon as possible.

Have you tried 4.12.5 yet?

Yes I tried, but it is still starting slow. Looks like this is a memory issue, because if I execute a “Collect Garbage” node, it starts back from 10~ fps. Is Unreal Engine loading something asynchronously during the game? I don’t know how can I monitor this.

After you’ve launched the game multiple times, does the performance get better? It sounds like it could be a shader compile time that you’re running in to.

Yes, it gets better if I launch multiple times. If I reinstall or keep the phone idle for a while, it gets slower again.

Well, if you’re letting the game run for ages, it’s going to eventually eat up the memory depending on what type of game it is and your device only has so much memory.

If you’re uninstalling and reinstalling it, the shaders have to compile again which will cause the game to behave differently.

How can I resolve this issue? Same thing is happening with Zenfone 2 ZE551ML (released in 2015 summer) too. It starts with 25 fps and goes to 60 fps in one minute.

Device specs are:
1.8GHz Quad Core Intel
4GB RAM
PowerVR G6430

25 fps looks really bad without motion blur. I don’t want players to see this. Can I compile shaders before the game starts?

,

You have to open the game in order to get the shaders to compile, but each time you open it, it’ll get faster.

I tested on the Zenfone 2 that we have and verified that the FPS is around 25 FPS for SunTemple for 4.12.5 and 4.13.0 Preview 1.

Everything comes down to how you’ve set your project up. Are you using affordable particle effects, textures, materials, etc for a mobile device?

Check out this documentation:

  • [Mobile Performance Tips & Tricks][1]
  • [Performance Guidelines for Mobile Devices][2]
  • [Mobile Game Development][3]

Thanks!

https://docs.unrealengine.com/latest/INT/Platforms/Mobile/Performance/TipsAndTricks/index.html
[2]: Performance Guidelines for Mobile Devices in Unreal Engine | Unreal Engine 5.1 Documentation
[3]: General Mobile Development for Unreal Engine | Unreal Engine 5.1 Documentation

Draw call count doesn’t exceed 20 and vertex count doesn’t exceed 30,000 in any scene.

I am using a few scalable master materials(that most of their jobs are done in vertex shader) and I created nearly one hundred instances from them. I think this issue is happening because of this bug:

I think also long loading times’ reason is that bug. It adds tens of new shaders to the game and adds over 80MB of data to the cooked contents.

I think fixing that bug can make a appreciable performance improvement on mobile devices.

I tried testing by working around the bug and problem is looking fixed now. I think you are right, this was a shader compiler issue and I was able to fix it by creating new master materials instead of using static switches.

It starts with 25 fps again but it is increasing faster. I could’t measure fps in shipping mode but I didn’t see any low fps issues that I was seeing before.

I’m glad you were able to get around the issue. By the way, UE-16031 is still backlogged and unresolved at this time, but if you check up on this bug in the future, I can continue to give you updates.

Thanks!

Shader caching was pretty effective in 4.14.

Are there any news in 4.15?

UE-16031 is still backlogged.

Hi ,

Shader compiling process is still taking too much time in low-end devices. Users install and launch the game, they see that it is working around 15 to 20 fps, so they simply uninstall, without waiting 30 seconds.

There may be a workaround for this issue with this function: getShaderCompileStatus();

With this function, if FPS is low and shaders are compiling, I can pause the game and tell to wait until it ends. So that I can increase retention of the game significantly.

Any to get a this kind of function in 4.16?

Sup! How did you get that function, self-coded?