Johny
Johny

Reputation: 625

Unity Profiler - PlayerLoop almost 100% on Android devices

I'm checking profiler performance of my game on an Android device. When I check CPU Usage I noticed that PlayerLoop is at 99.6% and the biggest percentage is consumed in Semaphore.WaitForSignal with 32.5% and the second is PlayerConnection.Poll with 27%.

Can someone explain if there is a way to improve this? Is the PlayerLoop at 99.6% "normal" or is too high?

Below screenshot results from Xiaomi MI 5 Android 8 Profiler status

Upvotes: 3

Views: 11911

Answers (1)

Tomasz Juszczak
Tomasz Juszczak

Reputation: 2340

Provided percent in the profiler is "How mutch this item, contributes to the current execute time" and not "How much CPU you are using.

What is interesting to you is time in milliseconds for the biggest items. And whether something is too much or too little depends on what framerate you want to achieve.

What is Player Loop

The Player loop is the total time your game took to render 1 frame. In there you can find, all your scripts, rendering, and other engine functions.

What is Semaphore.WaitForSignal

Your Graphics pipeline is waiting for something else to finish. Usually, it means rendering is taking a while to finish, and some other parts of the graphics pipeline can't proceed until rendering is complete.

Is Player loop 99.6% normal

Yes, it preferably should always be around 100% unless you are in the editor.

What is exactly 27ms in the player loop

Total time required to process and render one frame. To achieve 30fps in-game you need to have all frames below 33ms (1000ms/30fps)

You can find more information here: https://docs.unity3d.com/Manual/ProfilerCPU.html

Upvotes: 5

Related Questions