Search Issue Tracker

By Design



Found in [Package]





Issue ID




[XR SDK][Oculus] EarlyUpdate.XRUpdate spikes inconsistently

Package: Oculus XR Plugin


Reproduction steps:
1. Open the attached project ("")
2. Open "SampleScene" scene
3. Make sure Scene and Game windows are visible
4. Open Profiler Window
5. Enter Play mode
6. Move HMD around

Expected result: EarlyUpdate.XRUpdate does not spike stays consistent
Actual result: EarlyUpdate.XRUpdate spikes inconsistently

Reproducible with: 2019.4.12f1, 2020.1.8f1, 2020.2.0b6
Not reproducible with: 2018.4.28f1 (XR SDK isn't available)

  1. Response avatar

    Resolution Note:

    The XRUpdate profiler marker covers a lot, so we're going to go over a few cases where it can spike in duration.

    First of all, almost always, the biggest consumer of time in XRUpdate on Oculus platforms is going to be waiting for frame sync. This wait happens in the Oculus runtime, and they do this wait to reduce latency, maintain proper cadence, etc. In order to clarify where XRUpdate is spending its time, we have added a new profiler marker: `OculusRuntime.WaitToBeginFrame`. This is available in the Oculus XR Plugin 1.7.0-preview.1 and higher. Anyone reporting or voting on this bug, it would be great if you could try this version of the Oculus XR Plugin and verify that the time is being spent in WaitToBeginFrame. If it is, it's likely going to be related to one of the items below. If it's not, please give us feedback.

    1) If you are using minimal frame time. In this case, WaitToBeginFrame will be waiting because you're running great and it's preventing the engine from feeding it frames too fast.
    2) If you are missing framerate, even if barely, or seemingly right on the edge with maybe even a bit of breathing room.
    3) If you are experiencing highly variable frame times. In this case you might see unusual behavior where WaitToBeginFrame is taking a long time one frame, and almost no time the next. This can happen because the runtime is trying to compensate for this variable frame timing.

    For point 3, one thing we've seen is that the in-editor profiler can induce these spikes. The Unity profiler updates in the main thread, but not every frame. When it does update, you'll notice two `EditorLoop` profiler markers. The second one is the profiler updating the UI, etc. Because this is on the main thread, it causes a spike in frame time, and the Oculus runtime appears to be compensating for this, resulting in the WaitToBeginFrame timing that we see.

    In Unity 2020.1+, you can run the profiler standalone, outside of the editor process. Doing this, we aren't seeing the same spikes caused by the profiler timing.

    In summary, please try out the 1.7.0-preview.1 or higher Oculus XR Plugin and see if the WaitToBeginFrame marker is what is taking the most time. If so, this is in the Oculus runtime, and it is doing what is needed to maintain proper cadence and low latency.

    If you don't believe that you are seeing one of the 3 cases mentioned above or something similar, please let us know.

Comments (19)

  1. Ca80d4a366963aff350b356c59ba83cc?d=mm


    Sep 01, 2021 14:54

    I am making a VR project where I am also getting spikes averaging around 9ms per frame from EarlyUpdate.XRUpdate in build and standalone profiler which is by far the largest performance hit. I am getting around 80 fps at the moment but need to get it to a stable 90 fps as the project progresses and many more features are added.

    I am running an Oculus Quest 2 via link cable to an MSI GP66 Leopard (i7, RTX 3070). Unity 2021.1.13 with Oculus plug in 1.9.1

    It would be great to have this looked into further.

  2. 0b95f318a98780e034c8b1077156017c?d=mm


    Aug 09, 2021 20:34

    I am experiencing random frame drops / spikes from EarlyUpdate.XRUpdate in build, even with the standalone profiler. Even without the spikes, it is consistently taking up more memory than anything else in the project, and it is a VERY graphics and physics intensive project. I would like to get to the bottom of this, as it is affecting our production builds as well. Would be helpful to be able to see what is actually causing the problem. Unity 2020.3.8f1 with Oculus plugin 1.9.1

  3. Aeb416d32a462f87372f8fefe173a6d5?d=mm


    May 23, 2021 19:28

    Issue is prevalent, it could be the target frame rate setting, which is being set in the XR system script of the Unity XR module...

  4. 8102869dee1f62888cc634414a00653d?d=mm


    Feb 23, 2021 09:51

    Any updates on this? I'm running autoconnected profiler directly from Oculus Quest 2 and while the apk is running, the EarlyUpdate.XRUpdate is taking 25.58ms !!! The rest of the apk is taking 11.3ms, so if not for this I'd easily have stable 72 fps instead of current 26/28fps. Worth noting that I'm running my apk on Vulkan, with URP and Oculus XR Plugin 1.7.0 + XR Plugin Management 3.2.16

  5. 873f173abc8f05b26078c573dba6d283?d=mm


    Dec 25, 2020 13:37

    I tried with an older version of Unity (2019.4) with legacy XR and Oculus Integration v15(?) (OVR 1.46.0) and the FPS is still low (on same Oculus App v24 and Oculus Quest v23). This wasn't the case before the update of either Windows 10 (20H2 from 1809), NVidia Drivers (v460.89 for GTX 1070) or Oculus Quest/App.
    Since it works fine (i.e. 80-90 FPS) the first time I start the app (Unity, Oculus App/Link) I tend to believe that is the latest update of Oculus Quest.
    The issue is not present if I build & run directly on the Quest (Android Player).

  6. 5701d8f48dd6408c390fd206142324f4?d=mm


    Dec 24, 2020 09:35

    By Design? Wow...

  7. 873f173abc8f05b26078c573dba6d283?d=mm


    Dec 22, 2020 10:27

    Still happens on Unity 2020.2 with Oculus Integration 20.1, Oculus XR Plugin 1.7.0 preview 2.

  8. Fe3efbcd9c272e68f92f1a9941b971f3?d=mm


    Dec 22, 2020 01:15

    I'm using Unity 2020.1.17f1, and I'm seeing spikes on EarlyUpdate.XRUpdate both in the editor and in standalone. I upgraded to the 1.7.0 preview of the Oculus XR plugin, but I'm not seeing any new markers registering in the profiler - it still says EarlyUpdate.XRUpdate.

    I'm not 100% sure that it's the same bug - the spikes are very frequent (every 10-15 seconds or so) and the spike is on the order of 100-300 milliseconds, which is a lot bigger than others who are reporting, and as mentioned, I'm seeing the same spikes in standalone. At this time, I can't deliver this to my client.

    This is on a 10-core i9, 64G memory, RTX 2080-Ti, M.2 SSD, so if anyone tells me my computer isn't fast enough, I'm going to laugh in your face. :)

  9. E658c77d5c153022385f0bf4e5261fc3?d=mm


    Dec 17, 2020 15:35

    Hopefully this is resolved soon.

  10. 5701d8f48dd6408c390fd206142324f4?d=mm


    Dec 10, 2020 11:44

    I tried the new Oculus 1.7.0-preview2 package and standalone profiler in 2020.2.0.b14 (HDRP 10.2); but still have XRUpdate spikes regularly (10+ ms with i9-9900kf + 2080s). It might be better than 1.6.x version, but not sure yet. I have not seen any OculusRuntime.WaitToBeginFrame spike.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.