New issue
Advanced search Search tips

Issue 633964 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Make the spare renderer optimization available to regular Chrome tabs.

Project Member Reported by lizeb@chromium.org, Aug 3 2016

Issue description

Pre-initialization of a renderer is a major performance gain for Custom Tabs. It can be done by calling CustomTabsConnection#warmup().

Currently, the spare renderer can only be used by Custom Tabs. This restriction is not necessary.
 
Related: Pre-allocate a Child connection on Tab creation on Android (bug #505677)

Comment 2 by lizeb@chromium.org, Aug 8 2016

Note: This was experimented with back in 2014. For some unknown reason, it was abandoned.

See: https://docs.google.com/document/d/1UTKNJci1RghNVA98UB94OrkTZdIu0-jcvTMM9V6CDPM/edit

Comment 3 by lizeb@chromium.org, Aug 8 2016

Ooops, wrong bug, nevermind.
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 17 2016

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

commit f7ce563033df1df90b314e4f727596c93c2b3d6d
Author: lizeb <lizeb@chromium.org>
Date: Wed Aug 17 13:27:28 2016

Android: Make the spare renderer accessible to all Chrome tabs.

In Custom Tabs, an external application can "warm up" Chrome. This
creates and initializes a spare renderer, and has been found to be a
significant optimization for loading performance.

This patch moves the spare renderer logic out of Custom Tabs, and makes
it accessible and useful for regular navigations in Chrome. Note that
this patch doesn't add new call sites for the spare renderer creation.

BUG= 633964 

Review-Url: https://codereview.chromium.org/2199393002
Cr-Commit-Position: refs/heads/master@{#412510}

[modify] https://crrev.com/f7ce563033df1df90b314e4f727596c93c2b3d6d/chrome/android/java/src/org/chromium/chrome/browser/WarmupManager.java
[modify] https://crrev.com/f7ce563033df1df90b314e4f727596c93c2b3d6d/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
[modify] https://crrev.com/f7ce563033df1df90b314e4f727596c93c2b3d6d/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
[modify] https://crrev.com/f7ce563033df1df90b314e4f727596c93c2b3d6d/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
[modify] https://crrev.com/f7ce563033df1df90b314e4f727596c93c2b3d6d/chrome/android/java_sources.gni
[add] https://crrev.com/f7ce563033df1df90b314e4f727596c93c2b3d6d/chrome/android/javatests/src/org/chromium/chrome/browser/WarmupManagerTest.java
[modify] https://crrev.com/f7ce563033df1df90b314e4f727596c93c2b3d6d/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java
[modify] https://crrev.com/f7ce563033df1df90b314e4f727596c93c2b3d6d/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsConnectionTest.java
[modify] https://crrev.com/f7ce563033df1df90b314e4f727596c93c2b3d6d/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreatorTest.java

Comment 5 by lizeb@chromium.org, Aug 17 2016

Status: Fixed (was: Assigned)
Project Member

Comment 6 by bugdroid1@chromium.org, Aug 18 2016

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

commit 21f7b3ae303e08aaccd054870bf5b3978589d702
Author: lizeb <lizeb@chromium.org>
Date: Thu Aug 18 13:17:13 2016

Reland of Android: Make the spare renderer accessible to all Chrome tabs.

Original CL description (from https://codereview.chromium.org/2199393002/):

Android: Make the spare renderer accessible to all Chrome tabs.

In Custom Tabs, an external application can "warm up" Chrome. This
creates and initializes a spare renderer, and has been found to be a
significant optimization for loading performance.

This patch moves the spare renderer logic out of Custom Tabs, and makes
it accessible and useful for regular navigations in Chrome. Note that
this patch doesn't add new call sites for the spare renderer creation.

TBR=yusufo,maria # trivial fix to a test.
BUG= 633964 

Review-Url: https://codereview.chromium.org/2254063003
Cr-Commit-Position: refs/heads/master@{#412808}

[modify] https://crrev.com/21f7b3ae303e08aaccd054870bf5b3978589d702/chrome/android/java/src/org/chromium/chrome/browser/WarmupManager.java
[modify] https://crrev.com/21f7b3ae303e08aaccd054870bf5b3978589d702/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
[modify] https://crrev.com/21f7b3ae303e08aaccd054870bf5b3978589d702/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
[modify] https://crrev.com/21f7b3ae303e08aaccd054870bf5b3978589d702/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
[modify] https://crrev.com/21f7b3ae303e08aaccd054870bf5b3978589d702/chrome/android/java_sources.gni
[add] https://crrev.com/21f7b3ae303e08aaccd054870bf5b3978589d702/chrome/android/javatests/src/org/chromium/chrome/browser/WarmupManagerTest.java
[modify] https://crrev.com/21f7b3ae303e08aaccd054870bf5b3978589d702/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java
[modify] https://crrev.com/21f7b3ae303e08aaccd054870bf5b3978589d702/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsConnectionTest.java
[modify] https://crrev.com/21f7b3ae303e08aaccd054870bf5b3978589d702/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreatorTest.java

Comment 7 by agrieve@google.com, Oct 11 2016

Is there a bug or plan to add a new callsite to warmUp() for regular chrome tabs?
Project Member

Comment 8 by bugdroid1@chromium.org, Oct 20 2016

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

commit d9eaf67b1505d1bc103d3c9021f5a4b6545457b1
Author: lizeb <lizeb@chromium.org>
Date: Thu Oct 20 19:47:47 2016

customtabs: Add a histogram about the state if the renderer on creation.

This adds an histogram giving the breakdown between the different types
of WebContents state on tab creation (prerender, spare renderer or none).

BUG= 633964 

Review-Url: https://chromiumcodereview.appspot.com/2422413003
Cr-Commit-Position: refs/heads/master@{#426568}

[modify] https://crrev.com/d9eaf67b1505d1bc103d3c9021f5a4b6545457b1/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
[modify] https://crrev.com/d9eaf67b1505d1bc103d3c9021f5a4b6545457b1/tools/metrics/histograms/histograms.xml

Sign in to add a comment