Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

perf of Polyfill tracking degraded with new Sensor API (since devicemotion is being deprecated) on Chrome for Android #254

Closed
cvan opened this issue Apr 21, 2018 · 0 comments

Comments

@cvan
Copy link
Contributor

cvan commented Apr 21, 2018

reproduced in Chrome 65 on an Android Pixel 2 device:

  1. ensure that the WebVR flag is Disabled from chrome://flags#enable-webvr
  2. using Chrome on Android (current release: 65), navigate to the demo scene at https://mozilla.github.io/unity-webvr-export/ (or your localhost server)
  3. click the VR-icon button to enter VR mode.
  4. put your mobile phone in your Daydream headset viewer.
  5. move your head around a ton, up and forth, left and right.
  6. notice the tracking is really lagged. the perf was noticeably better.

likely, this appears to be mostly caused the upgrade of the WebVR Polyfill in v1.1.0.

in the most recent release, Chrome for Android just shipped the Sensor API removing the previously required flag.

based on Chromium's bug trackers and the Chromium Developers mailing list, Chrome is deprecating the devicemotion API very soon, in favour of this recently shipped Sensor API (a similar Intent to Deprecate has been announced by the Firefox/Gecko folks on the Mozilla dev.platform mailing list).

the webvr-polyfill (via cardboard-vr-display), if the API is supported, uses the Sensor API instead of devicemotion.

this work was done in immersive-web/cardboard-vr-display#10

the actionable steps here are to see if we can file issues in the Chromium tracker to improve the frequency of the sensor reading updates. likely, we'll need to bring this up with the Immersive Group to see if there is a plan to improve mobile perf for WebVR. (this may be indicative of a larger issue, or it could just be a regression in our Unity -> WebVR codepath via sendMessage. cc @caseyyee)

and a relevant, but separate, issue: immersive-web/cardboard-vr-display#11

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants