New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 731462 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug

Blocking:
issue 726844



Sign in to add a comment

Stop using Cast Android SDK on low end devices

Project Member Reported by avayvod@chromium.org, Jun 9 2017

Issue description

The usage is very low (1-3% of total feature usage) and the potential savings are 2-3Mb of RAM.

Internal only link to UMAs (worldwide): https://uma.googleplex.com/p/chrome/histograms/?endDate=20170607&dayCount=7&histograms=Blink.UseCounter.Features%2CCast.Sender.CastPlayerResult&fixupData=true&showMax=true&filters=platform%2Ceq%2CA%2Cchannel%2Ceq%2C4%2Cis_low_mem%2Ceq%2CTrue%2Cisofficial%2Ceq%2CTrue&implicitFilters=isofficial

(hint: find PresentationRequestStart in Blink UseCounters for Presentation API usage).
 
Labels: M-61 LowMemory
Blocking: 726844
Anton, any updates on making the code change here? Would really like to have it in time for M-61.
Hm, I discussed this with Mounir earlier and it's understood that Cast SDK will only be used by Chrome on low-end devices once the user clicks on the Cast button in Chrome.

Does it mean Chrome will already only start using extra 2-3Mb of RAM at that point?

If true, it might be a reasonable trade off given the user very explicitly demonstrated their intent to cast.
Is it guaranteed that absolutely no cast GMS Core APIs would be called until the user actually clicks cast button? I thought that you were using the APIs to figure out whether the button should even be shown?
For the Cast Web SDK / Presentation API, yes. We just show the button
anyway.

For the media flinging backend, we'd still do discovery. I'll work on a fix.
Project Member

Comment 6 by bugdroid1@chromium.org, Jul 10 2017

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

commit b5e64b1f780dcaa7ac6070a06a39218f7f07e72a
Author: Anton Vayvod <avayvod@google.com>
Date: Mon Jul 10 05:01:02 2017

[RemotePlayback, Android] Don't monitor availability on low end devices

When the availability callback is added from the native controls, the
low end device check is by-passed. Add an extra check and also return
availability as true on such devices so that the button is shown.

BUG= 731462 
TEST=manual+existing tests

Change-Id: I34c6815a82c1a75ea7e174341703c19fee33af7a
Reviewed-on: https://chromium-review.googlesource.com/545275
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Commit-Queue: Anton Vayvod <avayvod@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485185}
[add] https://crrev.com/b5e64b1f780dcaa7ac6070a06a39218f7f07e72a/third_party/WebKit/LayoutTests/media/controls/controls-cast-button-low-end-device.html
[modify] https://crrev.com/b5e64b1f780dcaa7ac6070a06a39218f7f07e72a/third_party/WebKit/LayoutTests/media/remoteplayback/util.js
[modify] https://crrev.com/b5e64b1f780dcaa7ac6070a06a39218f7f07e72a/third_party/WebKit/LayoutTests/media/remoteplayback/watch-availability-throws-low-end-device.html
[modify] https://crrev.com/b5e64b1f780dcaa7ac6070a06a39218f7f07e72a/third_party/WebKit/Source/core/testing/Internals.cpp
[modify] https://crrev.com/b5e64b1f780dcaa7ac6070a06a39218f7f07e72a/third_party/WebKit/Source/core/testing/Internals.h
[modify] https://crrev.com/b5e64b1f780dcaa7ac6070a06a39218f7f07e72a/third_party/WebKit/Source/core/testing/Internals.idl
[modify] https://crrev.com/b5e64b1f780dcaa7ac6070a06a39218f7f07e72a/third_party/WebKit/Source/modules/media_controls/MediaControlsMediaEventListener.cpp
[modify] https://crrev.com/b5e64b1f780dcaa7ac6070a06a39218f7f07e72a/third_party/WebKit/Source/modules/media_controls/MediaControlsMediaEventListener.h
[modify] https://crrev.com/b5e64b1f780dcaa7ac6070a06a39218f7f07e72a/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.cpp
[modify] https://crrev.com/b5e64b1f780dcaa7ac6070a06a39218f7f07e72a/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.h

Status: Fixed (was: Assigned)
I believe this is fixed.

Sign in to add a comment