Skip to main content
Inspiring
October 27, 2014

[0.4.3] Intermittent but severe performance issue

I'm seeing an occasional performance issue that happens at least a few times every time I run through my demo with the 0.4.3 SDK, built with Unity 4.5.5f1.

It will be running smoothly at 75 FPS (200+ without Vsync via EnabledCaps), and then suddenly halve to 37FPS (or somewhere between 37 and 75) and stay that way until I toggle Vsync off and then back on again.

According to profiler (running in the Editor), the culprit is OVR_UnityGetModeChange() in the Oculus plugin. When it's called from OVRDisplay.UpdateTextures(), It either clocks in at ~0ms, or at 7-12ms on the CPU on my GTX 660. During a simple scene, this doesn't kill my GPU, but during the main game I am seeing GPU skyrocket to 20-43ms at around the same time that there starts to be a few slow calls to OVR_UnityGetModeChange(). Switching vsync off and back on again doesn't help break out of this in the Editor.

Here's a couple of screenshots. (Right-click -> open in new tab to see the whole thing since the forum's upload feature seems to be broken at the moment)

In this first picture, the top shows the performance problem, and the bottom shows normal profiler readings. That whole spiky section of the CPU graph on the top is all slow OVR_UnityGetModeChange() calls, and the spikes themselves are when the OVR_UnityGetModeChange() takes extra long (43ms etc).


And this second screenshot has the script breakdown pointing to OVR_UnityGetModeChange() as the culprit.


I didn't see the source code for OVR_UnityGetModeChange() anywhere in the base SDK, so I'm guessing the Unity plugin has some extra logic built on top of that. Is anyone able to describe what OVR_UnityGetModeChange() is actually doing, and if not calling it would cause any serious issues?

Thanks in advance!
    This topic has been closed for replies.

    21 replies

    Inspiring
    October 28, 2014
    We have fixed the issue on our side. Performance should be more consistent in the next release.
    Up and Coming
    October 28, 2014
    "vrdaveb" wrote:
    We have fixed the issue on our side. Performance should be more consistent in the next release.


    that is awesome - is that relase more like a month away or 1-2 weeks? it is a bit annoying, because I am still in the optimizing and testing phase to make sure I get all the eye candy running well on my machine. and right now I can not trust the results of changes!
    check out my Mobile VR Jam 2015 title Guns N' Dragons
    October 28, 2014
    Inspiring
    October 29, 2014
    Should be around 1-2 weeks.
    Up and Coming
    October 29, 2014
    What about us poor UE4 developers? :cry:
    https://answers.unrealengine.com/questions/124299/451-capped-at-375-fps.html

    Do you think this could be related? Could you please have a look? (or pass it to someone working in the Unreal integration).

    Thank you!
    Up and Coming
    November 1, 2014
    "vrdaveb" wrote:
    Should be around 1-2 weeks.


    Sweet, thanks Dave. Even a rough timeline like this really helps planning.

    Thanks to Drash and everyone for identifying this also. Only a few scenes deep of updating, so easy to revert.
    Cubicle Ninjas Custom VR App Development Guided Meditation VR for Rift, Gear, and Go
    November 11, 2014
    Happy to report the 0.4.3.1 release that just came out fixes this and other issues for me!

    ccs
    drashAuthor
    Inspiring
    November 11, 2014
    "ccs" wrote:
    Happy to report the 0.4.3.1 release that just came out fixes this and other issues for me!

    ccs

    Absolutely. Can confirm. Huge thanks and kudos to Oculus for pushing out an update for the Unity devs for this and some of the other issues.
    Titans of Space PLUS for Quest is now available on DrashVR.com
    Inspiring
    November 26, 2014
    Actually i'm still having issues with the 0.4.3.1 with Unity,DX11 and Vsync every Blank.

    I'm having stable 37.5fps when the framerate slightly drops down the 65-70fps..
    MIND LABYRINTH VR DREAMS MIND UNLEASHED
    Inspiring
    November 26, 2014
    That's how Vsync works. If you drop below 75fps it will refresh at 75fps/2 = 37.5fps. More info here: http://hardforum.com/showthread.php?t=928593

    If you want it to go as fast as possible when it dips below 75fps, you should disable Vsync.