New issue
Advanced search Search tips

Issue 855188 link

Starred by 5 users

Issue metadata

Status: Started
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Feature

Blocked on:
issue 857522



Sign in to add a comment

Make the gamepad polling rate configurable

Project Member Reported by mattreynolds@chromium.org, Jun 21 2018

Issue description

Chrome should allow the interval used in the gamepad polling loop to be configurable so that users can select a higher polling rate than the default (approximately 60 Hz), which may not be appropriate for all applications.
 

Comment 1 by khaledar@google.com, Jun 25 2018

An additional requirement for this feature is to make the flag configuration set for all Bigfoot users. 

We discussed potentially using an Origin trial for this, just want to make sure its tracked as a req.
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 28 2018

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

commit 660a4775ffe167a0de2ef81531170b0e6c9ee74d
Author: Matt Reynolds <mattreynolds@google.com>
Date: Thu Jun 28 19:42:48 2018

Add a flag to configure the gamepad polling interval

Adds --gamepad-polling-interval [INTERVAL], where INTERVAL is the delay
in milliseconds between successive polls of gamepad button and axis
inputs. Decreasing the interval improves latency, but may cause a loss
in performance due to more CPU time spent in the input polling thread.
The interval must be between 4 and 16 ms, inclusive. If no interval is
specified the max value (16ms) is used.

Also adds chrome://flags#gamepad-polling-rate to allow selection of the
target polling rate from the flags page.

BUG=855188

Change-Id: I9ec58c7320eff952c46bce263da8526459ad8a9b
Reviewed-on: https://chromium-review.googlesource.com/1110742
Commit-Queue: Matt Reynolds <mattreynolds@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571227}
[modify] https://crrev.com/660a4775ffe167a0de2ef81531170b0e6c9ee74d/chrome/browser/BUILD.gn
[modify] https://crrev.com/660a4775ffe167a0de2ef81531170b0e6c9ee74d/chrome/browser/DEPS
[modify] https://crrev.com/660a4775ffe167a0de2ef81531170b0e6c9ee74d/chrome/browser/about_flags.cc
[modify] https://crrev.com/660a4775ffe167a0de2ef81531170b0e6c9ee74d/chrome/browser/flag_descriptions.cc
[modify] https://crrev.com/660a4775ffe167a0de2ef81531170b0e6c9ee74d/chrome/browser/flag_descriptions.h
[modify] https://crrev.com/660a4775ffe167a0de2ef81531170b0e6c9ee74d/device/gamepad/BUILD.gn
[modify] https://crrev.com/660a4775ffe167a0de2ef81531170b0e6c9ee74d/device/gamepad/gamepad_provider.cc
[modify] https://crrev.com/660a4775ffe167a0de2ef81531170b0e6c9ee74d/device/gamepad/gamepad_provider.h
[modify] https://crrev.com/660a4775ffe167a0de2ef81531170b0e6c9ee74d/device/gamepad/public/cpp/BUILD.gn
[add] https://crrev.com/660a4775ffe167a0de2ef81531170b0e6c9ee74d/device/gamepad/public/cpp/gamepad_switches.cc
[add] https://crrev.com/660a4775ffe167a0de2ef81531170b0e6c9ee74d/device/gamepad/public/cpp/gamepad_switches.h
[modify] https://crrev.com/660a4775ffe167a0de2ef81531170b0e6c9ee74d/tools/metrics/histograms/enums.xml

Project Member

Comment 3 by bugdroid1@chromium.org, Jul 16

Project Member

Comment 4 by bugdroid1@chromium.org, Aug 27

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

commit 233a3244cd0dcf4c57fb01279caebbd80c87babd
Author: Matt Reynolds <mattreynolds@google.com>
Date: Mon Aug 27 20:26:27 2018

Decrease the default gamepad polling interval

Changes the default internal polling interval for gamepad state from
16 ms (~60 Hz) to 4 ms (~250 Hz).

BUG=855188

Change-Id: I4b791c27330b56519a7484c423ec764a00320e01
Reviewed-on: https://chromium-review.googlesource.com/1191234
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Matt Reynolds <mattreynolds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586395}
[modify] https://crrev.com/233a3244cd0dcf4c57fb01279caebbd80c87babd/device/gamepad/public/cpp/gamepad_features.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Aug 29

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

commit fa2bf58044937e6ffe848a0d5d1f5b6c99ed7f17
Author: Matt Reynolds <mattreynolds@google.com>
Date: Wed Aug 29 19:20:40 2018

Add GamepadPollingInterval field trial config

Add a default configuration for the GamepadPollingInterval finch
experiment to fieldtrial_testing_config.json.

BUG=855188

Change-Id: I0168675acaa21c95db0e6f61d4735a5dc791ef61
Reviewed-on: https://chromium-review.googlesource.com/1191808
Reviewed-by: Robert Kaplow (slow) <rkaplow@chromium.org>
Commit-Queue: Matt Reynolds <mattreynolds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587234}
[modify] https://crrev.com/fa2bf58044937e6ffe848a0d5d1f5b6c99ed7f17/testing/variations/fieldtrial_testing_config.json

As of today (Sept 12) the experiment is enabled in Canary, Dev, and Beta channels at 50% in M69+. Stable is still at 0%.
Launched a configuration to enable the faster polling rate for 100% of "dogfood" devices (essentially all Google-managed devices with an asset tag).

Non-dogfood installs are still at the rates described in #6
Blockedon: 857522
Missed an update here: starting September 27 we modified the Stable channel configuration to run a 1% experiment enabling the faster rate, with a 1% control group. The remaining 98% were configured to use the older rate.

Metrics look good with no significant performance impact at the faster rate. Starting today (Oct 16) the remaining 98% are configured to use the new, faster rate. The 1% experiment group and 1% control group are left unmodified so we can continue to measure the impact of this change.

We should now remove the chrome://flags option and clean up the Finch experiment in non-Stable channels.

Sign in to add a comment