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)
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
Ooops, wrong bug, nevermind.
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
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
Is there a bug or plan to add a new callsite to warmUp() for regular chrome tabs?
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
Comment 1 by agrieve@chromium.org
, Aug 5 2016