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

Issue 758789 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocking:
issue 735799



Sign in to add a comment

PhysicalWeb triggers GoogleSettingsProvider

Project Member Reported by dskiba@chromium.org, Aug 25 2017

Issue description

I'm currently optimizing Chrome startup time on 512 Android Go device, and I noticed that PhysicalWeb seems to trigger com.google.android.gsf/.settings.GoogleSettingsProvider provider, which creates com.google.process.gapps process.

Here is jdb stacktrace which seems to be missing couple of frames:

main[1] where
  [1] android.content.ContentResolver.query (ContentResolver.java:737)
  [2] android.content.ContentResolver.query (ContentResolver.java:704)
  [3] android.content.ContentResolver.query (ContentResolver.java:662)
  [4] com.google.android.L.P.r (GoogleSettingsContract.java:3)
  [5] com.google.android.L.P.B (GoogleSettingsContract.java:10)
  [6] com.google.android.L.p.s (UseLocationForServices.java:1)
  [7] com.google.android.apps.chrome.location.GoogleLocationSetting.isGoogleLocationSettingEnabledOrNotEnforceable (GoogleLocationSetting.java:2)
  [8] com.google.android.apps.chrome.location.LocationUtilsInternal.isSystemLocationSettingEnabled (LocationUtilsInternal.java:5)
  [9] org.chromium.chrome.browser.init.ProcessInitializationHandler$5.run (ProcessInitializationHandler.java:11)
  [10] org.chromium.chrome.browser.DeferredStartupHandler$$Lambda$0.queueIdle (unknown)
  [11] android.os.MessageQueue.next (MessageQueue.java:394)
  [12] android.os.Looper.loop (Looper.java:142)
  [13] android.app.ActivityThread.main (ActivityThread.java:6,494)
  [14] java.lang.reflect.Method.invoke (native method)
  [15] com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:438)
  [16] com.android.internal.os.ZygoteInit.main (ZygoteInit.java:807)

The missing frames are:

LocationUtilsInternal.isSystemLocationSettingEnabled
PhysicalWeb.shouldAutoEnablePhysicalWeb
PhysicalWeb.onChromeStart
ProcessInitializationHandler.handleDeferredStartupTasksInitialization


The problem is that additional processes slow Chrome startup, so we're trying to get rid of them. I see that PhysicalWeb doesn't do scans if on low-end devices - does it mean we can also avoid the check?
 

Comment 1 by cco3@chromium.org, Aug 25 2017

Yes, we can shortcircuit the check.

Comment 2 by dskiba@chromium.org, Aug 25 2017

Good! Do you have bandwidth to do the change?

Comment 3 by cco3@chromium.org, Aug 25 2017

Owner: cco3@chromium.org
https://chromium-review.googlesource.com/636199

Comment 4 by dskiba@chromium.org, Aug 25 2017

Blocking: 735799
Project Member

Comment 5 by bugdroid1@chromium.org, Aug 25 2017

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

commit 878d48cbfc87a7d07e526044fbdacb8d5a2e13a1
Author: Conley Owens <cco3@chromium.org>
Date: Fri Aug 25 19:36:15 2017

physicalweb: Skip location check on low end device

LocationUtils.isSystemLocationSettingEnabled potentially runs an
intensive routine.  This change checks whether we are on a low end
device first in order to short circuit the location check.

BUG= 758789 

Change-Id: Ia869e4dbaf94d8bce29c31bef00388286df4696c
Reviewed-on: https://chromium-review.googlesource.com/636199
Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org>
Reviewed-by: Dmitry Skiba <dskiba@chromium.org>
Commit-Queue: Conley Owens <cco3@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497495}
[modify] https://crrev.com/878d48cbfc87a7d07e526044fbdacb8d5a2e13a1/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java

Comment 6 by dskiba@chromium.org, Aug 28 2017

Status: Verified (was: Untriaged)

Sign in to add a comment