-
Notifications
You must be signed in to change notification settings - Fork 220
Extremely poor performance in immersive mode in Sketchfab.com #374
Comments
For reference, sketchfab works very well in the just released Samsung Internet browser for the Oculus Go. Both in terms of immersive mode and framerate. |
Did some research on Sketchfab issues:
|
Update:
Important things that we need to land
@avrignaud In summary, I think the ship blocker is enabling multiprocess preference. Our WebGL is also slower but that may be difficult to be fixed |
Blocked by #451 |
@MortimerGoro I have a few progress about the performance investigation. First of all, we take too much waiting time for posting VR tasks in the immersive mode. Ideally, for Oculus Go, it expects 16 ms per frame for 60 FPS. That means for one rAF to the next rAF only has 16 ms. But our delayed thread makes it postpone to 50ms [1][2]. After changing them to 0, in the immersive mode, we can normally only need 16 ms for rAF for most WebVR examples. I can show you some stats for aframe/sky [3] and playcanvas[4] when calling
According to the PlayCanvas example, we can understand the VSync time still work properly even the FPS is not good enough. In the immersive mode, the loop time increase to 17 ms from 10 ms, that also make rAF increase 7 ms for waiting the finish of rAF loop. So, we can realize PlayCanvas is a CPU bound from WebGL, and we need to investigate WebGL functions' bottleneck. But, for aframe/sky, the only strange thing is its stale frames, we can solve it by #453 but no idea why this kind of simple demo would happen stale frames. [1]
[2] https://dxr.mozilla.org/mozilla-central/rev/c2e3be6a1dd352b969a45f0b85e87674e24ad284/gfx/vr/gfxVRExternal.cpp#144 [3] https://aframe.io/examples/showcase/sky/ [4] https://developer.playcanvas.com/en/tutorials/webvr-lab/ |
Moving to V1.1, as blocked on a key bug we can't fix for V1. |
[1] Should not be changed to 0, because it will skip most of the frame submits or use the previous frame. [2] as I understand that's used to trigger the watchdog, which only triggers a new frame in special situations. A new frame should be triggered immediately (with no timers) just after finishing the previous one, isn't Gecko WebVR doing that? |
After removing Besides, the Playcanvas immersive demo was doing stereo render in the content side, so they have more draw calls, so it makes sense to take more time in their render loop. The purpose of watchdog in the desktop is in order to force calling rAF again if it has been stuck 50ms after the last update of VRDisplay.rAF. But the VR thread.PostDelayedTask() in Android seems to make it only calls https://dxr.mozilla.org/mozilla-central/source/gfx/vr/VRDisplayHost.cpp#274 |
Removing the wait can cause discarded frames or using old WebGL frames. Stats are going to show 60 FPS but the latency is going to be high or inconsistent. kConditionTimeout is the maximum wait time, it's set to 100ms (10FPS) but ideally it should exit before 16ms when Gecko notifies that the WebGL frame for the latest pose is ready.
That 50ms should be used for the watchdog checks only. A new frame is submitted immediately after the last frame was submitted succesfully. It's a bit confusing but I found that the loop call is done here: https://dxr.mozilla.org/mozilla-central/source/gfx/vr/VRDisplayHost.cpp#317. |
There was a recent regression here - possibly on Sketchfab's side because of mobile sniffing vs. feature detection. Not sure if from FxR's last UA change. But entering VR from a Sketchfab model page is currently not possible. |
@cvan Are things better with the latest builds and the updates from Sketchfab, especially around the UA sniffing? |
@lbergstrom: the perf is not in good shape still. I can send them perf traces, but I am not sure they will be optimising for the Go hardware. the otherwise two WebCompat/ContentFeed issues I found and asked about having fixed are these:
I can friendly ping them, as it has been a while. |
Thanks for all the investigation. No noticeable perf improvements, and we still have the controller issues per my comment above. This is unfortunate, but it looks like we are blocked on Sketchfab. And Multiprocess (issue #451) will help. We can address this after v1.1. |
BTW: The performance of Sketchfab models on the Oculus Go is still significantly worse than that of Oculus Browser. |
Hardware
Oculus Go
Steps to Reproduce
Current Behavior
Initially site says to touch and drag, but pointing laser pointer and clicking does not cause model to move.
Entering immersive (using same mech model) is very slow, and several graphic glitches occur on way. Once loaded, performance is terrible - 2-5 FPS? Then locks up.
Backing out of model brings you back to home page, at which point user can click/drag model on page, but again, with extremely poor performance.
Expected Behavior
Should be able to visit website, point and click to interact with model, enter immersive, navigate in immersive at full performance, and return seamlessly.
Possible Solution
Hoping we have ideas. :)
The text was updated successfully, but these errors were encountered: