Looping SetCoreGuiEnabled Tanks VR Framerate

Reproduction Steps

Nexus VR Character Model got a bug report that performance was heavily degraded, which ended up being due to a new bug that manifested in Nexus VR Backpack. To prevent the Roblox backpack from being open, it looped StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false) 10 times a second without checking GetCoreGuiEnabled. Outside of VR, there is no effect. In VR, framerates went from normal performance to <20 FPS in a couple of minutes. Speeding up the process can lead to the same effect in about 10 seconds in a LocalScript with nothing else:

local StarterGui = game:GetService("StarterGui")
while true do
	StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
	task.wait()
end

Expected Behavior

Performance should be unaffected like it was in previous releases in VR and still is outside of VR.

Actual Behavior

Performance in VR gradually degrades from a normal framerate to <20 FPS. It is not sudden and slowly gets worse the longer it runs.

Workaround

Checking GetCoreGuiEnabled(Enum.CoreGuiType.Backpack) before setting the value resolved the performance issues. It seems weird to require it on the developer end instead of ignoring the input if it is already set in the engine end.

Issue Area: Engine
Issue Type: Performance
Impact: Moderate
Frequency: Constantly
Date First Experienced: 2022-09-21 00:09:00 (-04:00)
Date Last Experienced: 2022-09-29 00:09:00 (-04:00)

6 Likes

Can vouch that i’ve personally experienced this frame drop and it has made me nauseous and dizzy. Seems like a hassle for vr games.

Thanks for the report! We’ll investigate.

3 Likes

This should be fixed! Sorry for the late response. Are you still having trouble?

1 Like

I don’t have any active code to test it. Nexus VR Backpack removed disabling the default backpack due to user confusion.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.