New issue
Advanced search Search tips

Issue 741823 link

Starred by 3 users

Issue metadata

Status: Archived
Owner: ----
Closed: Jun 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Task
Proj-XR



Sign in to add a comment

☂ Reduce time it takes to enter VR

Project Member Reported by mthiesse@chromium.org, Jul 12 2017

Issue description

Our VR Entry is probably more asynchronous than it needs to be, and we do a bunch of work in onResume that we don't necessarily need to. We can do better.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1ce14915cedf6b51ccd3eb76122cfca580c5eedc

commit 1ce14915cedf6b51ccd3eb76122cfca580c5eedc
Author: Michael Thiessen <mthiesse@chromium.org>
Date: Thu Jul 13 15:14:26 2017

VR: Avoid checking isDaydreamCurrentViewer() during onResume

We used to check isDaydreamCurrentViewer in onResume to know if we were
paused due to headset insertion, which was important because we used to
exit VR in onPause.

We no longer exit VR in onPause, so headset insertion while in VR
doesn't cause us to exit VR since it only pauses then resumes us, so we
just need to make sure not to exit VR in onResume in this case.

This saves around 20-30ms in onResume.

Bug:  741823 
Change-Id: Ie8836554057170f953e73a3db5434024fe5fcf6f
Reviewed-on: https://chromium-review.googlesource.com/569015
Reviewed-by: Yash Malik <ymalik@chromium.org>
Commit-Queue: Michael Thiessen <mthiesse@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486382}
[modify] https://crrev.com/1ce14915cedf6b51ccd3eb76122cfca580c5eedc/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java

Project Member

Comment 2 by bugdroid1@chromium.org, Jul 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1d47c8c334160e9ebd34d575842a87acf42fa96e

commit 1d47c8c334160e9ebd34d575842a87acf42fa96e
Author: Michael Thiessen <mthiesse@chromium.org>
Date: Thu Jul 13 15:35:57 2017

VR: Don't unnecessarily update VR Support Level

Updating VR Support Level takes anywhere from 3-10ms on Pixel phones.
In most cases we can skip this work.

Bug:  741823 
Change-Id: I8747fb19aea00444ceef1fb245f869b022a67e61
Reviewed-on: https://chromium-review.googlesource.com/568811
Reviewed-by: Biao She <bshe@chromium.org>
Commit-Queue: Michael Thiessen <mthiesse@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486389}
[modify] https://crrev.com/1d47c8c334160e9ebd34d575842a87acf42fa96e/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java

Project Member

Comment 3 by bugdroid1@chromium.org, Sep 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7877850aacaead4be004d301b876ac556a48a7ab

commit 7877850aacaead4be004d301b876ac556a48a7ab
Author: Michael Thiessen <mthiesse@chromium.org>
Date: Thu Sep 07 23:13:42 2017

VR: Don't start rendering until the activity is visible.

This makes starting VR after the DON flow ~150ms faster on release
builds because we're not doing a bunch of work drawing frames that won't
be visible. This 150ms savings is measured in the time between onResume
and OnWindowFocusChanged, which dropped from ~250ms to ~100ms on a Pixel
XL.

Bug:  763032 ,  741823 
Change-Id: Ia915a46c72c27cfe838e0d6b8d0336c566d6f413
Reviewed-on: https://chromium-review.googlesource.com/655774
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Reviewed-by: Yash Malik <ymalik@chromium.org>
Commit-Queue: Michael Thiessen <mthiesse@chromium.org>
Cr-Commit-Position: refs/heads/master@{#500426}
[modify] https://crrev.com/7877850aacaead4be004d301b876ac556a48a7ab/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
[modify] https://crrev.com/7877850aacaead4be004d301b876ac556a48a7ab/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
[modify] https://crrev.com/7877850aacaead4be004d301b876ac556a48a7ab/chrome/browser/android/vr_shell/vr_shell_gl.cc
[modify] https://crrev.com/7877850aacaead4be004d301b876ac556a48a7ab/chrome/browser/android/vr_shell/vr_shell_gl.h

Hi Michael,

Do we have tracing to measure the time to enter VR? If yes, we can set up continuous perf test to track it.
If we have tracing events for the Activity onStart and webVR frame submission we could measure the time between the two. However, this would have to be done on bots that don't skip the DON flow.

With DON skipping on, we could measure the time between a page calling requestPresent and submitting its first frame as well.
Status: Archived (was: Available)
Components: Internals>XR

Sign in to add a comment