Igalia / wolvic

A fast and secure browser for standalone virtual-reality and augmented-reality headsets.
https://wolvic.org
Mozilla Public License 2.0
813 stars 105 forks source link

Blocking in WebXR; Need support for Origin-Agent-Cluster for multi-thread/process iframes #46

Closed Steveorevo closed 2 years ago

Steveorevo commented 2 years ago

Configuration

Wolvic version: 0.9.4 Wolvic build ID: AppLab build

Hardware: Oculus Quest 2 - v37

Steps to Reproduce

  1. Create a WebXR application
  2. Create an iframe with a CPU intensive background task
  3. Witness the blocking that occurs. Modern browsers offer support for multi-thread/process iframes.

Current Behavior

Modern chromium based web browsers honor the Origin-Agent-Cluster response header. This feature was originally proposed by Mozilla and implemented in Chrome. Oculus Quest's native browser supports the feature; but has now changed to make it the default regardless of the response header. Wolvic does not offer the ability at all. For a video of the behavior in Oculus' browser (not blocking vs blocking) please see: https://youtu.be/V0i9CKdIV-g

Wolvic currently suffers from the same hiccups; although not quite as bad. Still not as smooth as the latest Oculus/Meta's native browser. For more details and examples visit this thread: https://forum.playcanvas.com/t/solved-multi-threaded-operations-in-webxr-editor-vs-published

Expected Behavior

WebXR applications can be very demanding. By allowing Origin-Agent-Cluster behavior or by defaulting to allow mutli-thread/process abilities in iframes; web developers can unlock more processor cores in their applications to perform VoIP, background rendering, etc. within their WebXR applications. Please bring support to Wolvic! :)

Possible Solution

For implementation details; please see https://web.dev/origin-agent-cluster/

Context

WebXR based apps that rival native applications on standalone devices are becoming more prevalent; however performance and platform independence is not guaranteed. To prevent vendor lock-in; we'd like to see an open source alternative to the native browser offered by Meta to ensure viability of a third-party browser alternatives. Basic performance and feature parity is needed. Since Wolvic can offer a browser that can be made available across platforms and hardware; having core compatibility is ideal.

Error Logs and Stack Traces

Please see video and message thread for details.

Steveorevo commented 2 years ago

Here is a demo link depicting the issue https://postmy.info/oo. The issue no longer occurs in Quest 2's native Oculus Browser with the latest v39 OS update. It looks like they are now supporting Origin-Agent-Cluster for multi-thread/process for all sites. Would love to see this in Wolvic.

svillar commented 2 years ago

I'm closing this since this is something that should be implemented by Gecko not Wolvic. You can check the status of Gecko implementation here. Looks like it hasn't have much traction so far...

Steveorevo commented 2 years ago

That's a shame. Facebook/Meta fixed this in their native browser. We've told clients to use Meta's browser as it currently offers this and is the only VR/XR browser capable of achieving such frame rates with multithreading -no stalling or hiccups.

Not sure what we'll suggest for upcoming Pico4/Vive users (or anyone else outside of Meta's offerings). Clearly stand-alone Snapdragon X2 is capable.

Perhaps tethering to PCVR will be the only workaround requirement for non-Meta Quest users.

Will forward info to Mozilla.

svillar commented 2 years ago

That's a shame. Facebook/Meta fixed this in their native browser. We've told clients to use Meta's browser as it currently offers this and is the only VR/XR browser capable of achieving such frame rates with multithreading -no stalling or hiccups.

Meta browser is basically Chrome BTW, so they have this support because Chrome does support it.