45fps in almost empty scene and other perfomance issues

Unity 2019.3.13f1, standard render pipeline.

For weeks now I’ve been having terrible perfomance in when running VR in the Unity editor. This issues don’t persist when I am running a build version of the game. I have a tough stomach so I’ve been ignoring the issues developing for a while but its coming to a point where it is effecting gameplay and I would like to understand why my performance in the editor is so bad and how I can fix it.

I remember a time (Feb 2020) where I was constantly hitting between 100-200fps using OVRManager. I don’t know what happened but I am left with about 45fps nowadays with occasional spikes all the way down to 15fps. The EditorLoop is only adding about 3.5ms according to my profiler, so that’s not the main issue.

What is eating up all the resources are
1.EarlyUpdate.XRUpdate
2.OVRManager.Update()
3.OVRManager.FixedUpdate()
and somtimes OVRManager.LateUpdate()

The PlayerLoop in the Profiler is because of that always sitting above 85% Total usage, with 25ms of CPU time.

Am I missing something here or why is my perfomance so bad?

The occasional hiccups you are seeing are caused by the EditorLoop.

By the way, disabling the OVRManager in the Hierarchy will give my fps of >100 but obviously OVRInput etc are not being called anymore.

Any help would be much appreciated.

2 Likes

Update: The culprit was OVRPlugin it seems. Luckily it is fixed with the new OVRIntegration 17.0.

Edit: Problems are back with Unity 2019.3.15f1

Hey @Stacklucker , have you found a solution for this? Also on 2019.3, seeing the same issues you wrote about.
Oculus Runtime 17.0.

From the looks of it EarlyUpdate.XRUpdate is actually the culprit here taking 9.4 ms… OVRPlugin might be take unusually long, and it might have been fixed, but other are having this same issue without OVRPlugin as well…

I created a thread about it a couple weeks ago here:

I also just submitted a bug report about it today and will post the upvote link to the above link once I’m emailed it

@colinleet was also looking at your thread a couple weeks ago. Bunch of people will upvote that link when you post it!

1 Like

Bug is still there.

In 2024

Turns out it wasn’t really a bug, but a frame sync feature for XR input which waits too long for the GPU frame to be delivered. 97% of the time what’s happening is that the GPU frame timing is exceeding the threshold for 1 frame’s render time (11.1 ms at 90 HZ), causing the XR plugin to wait a full extra frame to get back onto the input/frame sync from the VR headset. This used to be really hard to debug in 2020 when the profiler didn’t support GPU profiling, but it’s improved a lot since then.

3 Likes